From c8e863e25ecc7e20836f8f9275329d5afd5e4f0e Mon Sep 17 00:00:00 2001 From: Janne Heß Date: Mon, 26 Aug 2019 11:04:10 +0200 Subject: nixos/systemd: Add suspend-then-hibernate units Pretty useful for laptops. I use them with: ``` services.logind.lidSwitch = "suspend-then-hibernate"; environment.etc."systemd/sleep.conf".text = "HibernateDelaySec=8h"; ``` --- nixos/modules/system/boot/systemd.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nixos/modules/system') diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 23a2dd45d492..fedb2ebe86fb 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -112,11 +112,13 @@ let # Hibernate / suspend. "hibernate.target" "suspend.target" + "suspend-then-hibernate.target" "sleep.target" "hybrid-sleep.target" "systemd-hibernate.service" "systemd-hybrid-sleep.service" "systemd-suspend.service" + "systemd-suspend-then-hibernate.service" # Reboot stuff. "reboot.target" -- cgit 1.4.1