diff options
author | Janne Heß <janne@hess.ooo> | 2019-08-26 11:04:10 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2019-08-26 11:04:10 +0200 |
commit | c8e863e25ecc7e20836f8f9275329d5afd5e4f0e (patch) | |
tree | c8529f1664709bad97e144a6d29c58150847ce3b /nixos/modules/system | |
parent | d41b832ac24f57a3412d3004ad4a5eba2f387de8 (diff) | |
download | nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.tar nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.tar.gz nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.tar.bz2 nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.tar.lz nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.tar.xz nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.tar.zst nixlib-c8e863e25ecc7e20836f8f9275329d5afd5e4f0e.zip |
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"; ```
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 2 |
1 files changed, 2 insertions, 0 deletions
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" |