diff options
author | Philip Taron <philip.taron@gmail.com> | 2023-11-30 14:56:39 -0800 |
---|---|---|
committer | Philip Taron <philip.taron@gmail.com> | 2023-11-30 14:56:39 -0800 |
commit | 28bb97817f2b8d0581dfcc513273e0dc04b6b0a1 (patch) | |
tree | de166b398c6de491c1338cc7dcfee718657c8f6a /nixos/modules/config | |
parent | 8abf7c04993d786f5561d1c3ce35d0ebbc61ad1d (diff) |
nixos/swap: ensure correct ordering w.r.t. shutdown.target
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/swap.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index 8989a64082643..21046d6f1697b 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -258,7 +258,8 @@ in # avoid this race condition. after = [ "systemd-modules-load.service" ]; wantedBy = [ "${realDevice'}.swap" ]; - before = [ "${realDevice'}.swap" ]; + before = [ "${realDevice'}.swap" "shutdown.target"]; + conflicts = [ "shutdown.target" ]; path = [ pkgs.util-linux pkgs.e2fsprogs ] ++ optional sw.randomEncryption.enable pkgs.cryptsetup; |