mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +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.
|
# avoid this race condition.
|
||||||
after = [ "systemd-modules-load.service" ];
|
after = [ "systemd-modules-load.service" ];
|
||||||
wantedBy = [ "${realDevice'}.swap" ];
|
wantedBy = [ "${realDevice'}.swap" ];
|
||||||
|
requiredBy = lib.optionals sw.randomEncryption.enable [ "${realDevice'}.swap" ];
|
||||||
before = [
|
before = [
|
||||||
"${realDevice'}.swap"
|
"${realDevice'}.swap"
|
||||||
"shutdown.target"
|
"shutdown.target"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue