From 2670ad97e843525d73cd3df2b62de7c257ee1b55 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Mon, 27 May 2024 03:24:34 +0200 Subject: [PATCH] hosts/tablet: add special power key events handling --- hosts/tablet.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hosts/tablet.nix b/hosts/tablet.nix index 4cb94ff..32de99d 100644 --- a/hosts/tablet.nix +++ b/hosts/tablet.nix @@ -34,6 +34,16 @@ rec { from = 1714; to = from + 50; } ]; + services.logind.extraConfig = '' + HandlePowerKey=suspend + HandlePowerKeyLongPress=poweroff + HandleSuspendKey=suspend-then-hibernate + HandleSuspendKeyLongPress=hibernate + HandleLidSwitch=lock + HandleLidSwitchDocked=ignore + HandleLidSwitchExternalPower=lock + ''; + system.stateVersion = "23.11"; }; }