commit d216a231dd0912865cec808f04c9ca9e638b0685
parent 94532a228d5645a1c694902213bfd003deeafda3
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 18 Jun 2026 14:59:58 +0200
parent 94532a228d5645a1c694902213bfd003deeafda3
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 18 Jun 2026 14:59:58 +0200
machines/leucas: dont suspend on lid-close, but on power-button-press
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/machines/leucas.nix b/machines/leucas.nix @@ -69,6 +69,12 @@ websites."gomuks.zpha.de".enable = true; }; + + services.logind.settings.Login = { + HandleLidSwitch = "ignore"; + HandlePowerKey = "suspend"; + }; + }; }
diff --git a/nixosModules/zpha/programs/niri/settings.nix b/nixosModules/zpha/programs/niri/settings.nix @@ -60,6 +60,16 @@ }; }; + switch-events.lid-close.spawn = lib.singleton "${pkgs.writeShellScript "niri-lidSwitch-helper" '' + if [[ ! -f "$HOME/caffeinated" ]]; + then + ${lib.getExe pkgs.playerctl} pause + systemctl suspend + else + loginctl lock-session + fi + ''}"; + binds = (lib.mergeAttrsList ( lib.map