From 4851f745d8290be3e382320988c7473642d2a53d Mon Sep 17 00:00:00 2001 From: "Finn@MiBook" Date: Tue, 21 Jul 2026 17:42:47 +0200 Subject: [PATCH] feat(mibook): do nothing on lid close while on AC power Ship a system-wide PowerDevil default (/etc/xdg/powerdevilrc) setting the AC lid-close action to "do nothing" (LidAction=0). Battery behavior is left at the default (suspend). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01KbZoyXq6J8v2eqC9yn5Vcy --- machines/mibook/configuration.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/machines/mibook/configuration.nix b/machines/mibook/configuration.nix index c4d33e2..3ac1514 100644 --- a/machines/mibook/configuration.nix +++ b/machines/mibook/configuration.nix @@ -44,6 +44,14 @@ services.openssh.enable = true; + # KDE (PowerDevil) power settings: do nothing on lid close while on AC power. + # Shipped as a system-wide default; KConfig cascades so a user's own + # ~/.config/powerdevilrc will override this if present. + environment.etc."xdg/powerdevilrc".text = '' + [AC][SuspendAndShutdown] + LidAction=0 + ''; + system = { stateVersion = "23.05"; autoUpgrade.enable = true;