mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/swap: require mkswap when encrypted
the mkswap service manages a dm/luks block device when randomEncryption is enabled, and is not an optional dependency of the swap unit
This commit is contained in:
parent
48066b94cd
commit
41725bb0f7
1 changed files with 1 additions and 0 deletions
|
@ -277,6 +277,7 @@ in
|
|||
# avoid this race condition.
|
||||
after = [ "systemd-modules-load.service" ];
|
||||
wantedBy = [ "${realDevice'}.swap" ];
|
||||
requiredBy = lib.optionals sw.randomEncryption.enable [ "${realDevice'}.swap" ];
|
||||
before = [
|
||||
"${realDevice'}.swap"
|
||||
"shutdown.target"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue