about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authortmplt <tmplt@dragons.rocks>2020-06-16 23:42:56 +0200
committertmplt <tmplt@dragons.rocks>2020-06-16 23:42:56 +0200
commit51e995cc055f95ee4d7d0313cc5b9a71378e5afc (patch)
tree4949e49219efcdcbfa2ff4a37e036c4d4119921a /nixos/modules
parent084eaa498727f676e864b2b0ff504f3a74f09c98 (diff)
downloadnixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.tar
nixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.tar.gz
nixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.tar.bz2
nixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.tar.lz
nixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.tar.xz
nixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.tar.zst
nixlib-51e995cc055f95ee4d7d0313cc5b9a71378e5afc.zip
nixos/physlock: add suspend-then-hibernate to suspend/hibernate units
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/security/physlock.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/security/physlock.nix b/nixos/modules/services/security/physlock.nix
index 61bcd84f2e64..690eb70079d8 100644
--- a/nixos/modules/services/security/physlock.nix
+++ b/nixos/modules/services/security/physlock.nix
@@ -107,6 +107,7 @@ in
                 ++ cfg.lockOn.extraTargets;
         before   = optional cfg.lockOn.suspend   "systemd-suspend.service"
                 ++ optional cfg.lockOn.hibernate "systemd-hibernate.service"
+                ++ optional (cfg.lockOn.hibernate || cfg.lockOn.suspend) "systemd-suspend-then-hibernate.service"
                 ++ cfg.lockOn.extraTargets;
         serviceConfig = {
           Type = "forking";