From f93a9074e42ba71633a9e05269f2bc107d18d6db Mon Sep 17 00:00:00 2001 From: misuzu Date: Mon, 3 Feb 2020 18:31:46 +0200 Subject: nixos/systemd: add `systemd.sleep.extraConfig` config option --- nixos/modules/system/boot/systemd.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit 1.4.1