From 17c80b0a5a5a0605b9d1d52f33287c8b0baec6d1 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 26 Jun 2022 16:31:56 +0200 Subject: [PATCH] feat: suspend on power button press --- configuration.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configuration.nix b/configuration.nix index 501c0a4..43af3bf 100644 --- a/configuration.nix +++ b/configuration.nix @@ -24,6 +24,14 @@ logEvents = true; }; + services.logind = { + lidSwitch = "suspend"; + lidSwitchExternalPower = "ignore"; + extraConfig = '' + HandlePowerKey=suspend + ''; + }; + services.xserver = { enable = true; windowManager.i3.enable = true;