about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-02-04 23:02:53 +0100
committerGitHub <noreply@github.com>2020-02-04 23:02:53 +0100
commiteb09e82120e9c4d53686e68c7fc1e1293489e6c4 (patch)
tree72774c07b9de4c740a9dbd5f57d49a2cd8fd8abd /nixos
parent89d13541e5f90e6ddbac0822dfc76c4bb6b74850 (diff)
parentf93a9074e42ba71633a9e05269f2bc107d18d6db (diff)
Merge pull request #79162 from misuzu/systemd-sleep-config
nixos/systemd: add `systemd.sleep.extraConfig` config option
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/systemd.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 941df5797c660..2a5b3608311ad 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -697,6 +697,16 @@ in
       '';
     };
 
+    systemd.sleep.extraConfig = mkOption {
+      default = "";
+      type = types.lines;
+      example = "HibernateDelaySec=1h";
+      description = ''
+        Extra config options for systemd sleep state logic.
+        See sleep.conf.d(5) man page for available options.
+      '';
+    };
+
     systemd.user.extraConfig = mkOption {
       default = "";
       type = types.lines;
@@ -863,6 +873,7 @@ in
 
       "systemd/sleep.conf".text = ''
         [Sleep]
+        ${config.systemd.sleep.extraConfig}
       '';
 
       # install provided sysctl snippets