From 79951acb4b2d1a90b19adc4a7cdfcd3f826e3bbc Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sun, 17 Nov 2024 23:24:48 +0300 Subject: [PATCH] Logind: Disable power key globally. --- host/x86_64-linux/pocket/Logind.nix | 6 ++---- system/Logind.nix | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 system/Logind.nix diff --git a/host/x86_64-linux/pocket/Logind.nix b/host/x86_64-linux/pocket/Logind.nix index 6d5aa2d0..a5730e50 100644 --- a/host/x86_64-linux/pocket/Logind.nix +++ b/host/x86_64-linux/pocket/Logind.nix @@ -1,6 +1,4 @@ { ... }: { - services.logind = { - powerKey = "ignore"; - lidSwitch = "ignore"; - }; + # Don't suspend on lid closed. + services.logind.lidSwitch = "ignore"; } diff --git a/system/Logind.nix b/system/Logind.nix new file mode 100644 index 00000000..311853eb --- /dev/null +++ b/system/Logind.nix @@ -0,0 +1,4 @@ +{ ... }: { + # Disable the power key. + services.logind.powerKey = "ignore"; +}