From d42e9005e54ea560920e48f7276e365b25e9bc53 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Thu, 3 Oct 2024 11:18:00 +0200 Subject: [PATCH] system/hardware/power: move to services, add upower --- system/default.nix | 2 +- system/hardware/power.nix | 3 --- system/services/power.nix | 12 ++++++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) delete mode 100644 system/hardware/power.nix create mode 100644 system/services/power.nix diff --git a/system/default.nix b/system/default.nix index f33efbe..6ff66c8 100644 --- a/system/default.nix +++ b/system/default.nix @@ -19,8 +19,8 @@ let laptop = common ++ [ - ./hardware/power.nix ./hardware/fprintd.nix + ./services/power.nix ./services/keyd.nix ]; in { diff --git a/system/hardware/power.nix b/system/hardware/power.nix deleted file mode 100644 index dd79035..0000000 --- a/system/hardware/power.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - services.power-profiles-daemon.enable = true; -} diff --git a/system/services/power.nix b/system/services/power.nix new file mode 100644 index 0000000..299522b --- /dev/null +++ b/system/services/power.nix @@ -0,0 +1,12 @@ +{ + services = { + logind.extraConfig = '' + HandlePowerKey=suspend + ''; + + power-profiles-daemon.enable = true; + + # battery info + upower.enable = true; + }; +}