diff options
Diffstat (limited to 'modules/by-name')
-rw-r--r-- | modules/by-name/up/upower/module.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/by-name/up/upower/module.nix b/modules/by-name/up/upower/module.nix new file mode 100644 index 00000000..eb1c7af2 --- /dev/null +++ b/modules/by-name/up/upower/module.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + ... +}: let + cfg = config.soispha.services.upower; +in { + options.soispha.services.upower = { + enable = lib.mkEnableOption "upower"; + }; + + config = lib.mkIf cfg.enable { + services.upower = { + enable = true; + usePercentageForPolicy = true; + + percentageLow = 10; + percentageAction = 5; + + criticalPowerAction = "Hibernate"; + }; + }; +} |