about summary refs log tree commit diff
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
parent89d13541e5f90e6ddbac0822dfc76c4bb6b74850 (diff)
parentf93a9074e42ba71633a9e05269f2bc107d18d6db (diff)
downloadnixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.tar
nixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.tar.gz
nixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.tar.bz2
nixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.tar.lz
nixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.tar.xz
nixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.tar.zst
nixlib-eb09e82120e9c4d53686e68c7fc1e1293489e6c4.zip
Merge pull request #79162 from misuzu/systemd-sleep-config
nixos/systemd: add `systemd.sleep.extraConfig` config option
-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 941df5797c66..2a5b3608311a 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