mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
swap: depend on rngd if enabled and randomEncryption is configured to
avoid entropy starvation during boot
This commit is contained in:
parent
2de41ccab3
commit
1ac86e14c7
@ -185,6 +185,8 @@ in
|
||||
{ description = "Initialisation of swap device ${sw.device}";
|
||||
wantedBy = [ "${realDevice'}.swap" ];
|
||||
before = [ "${realDevice'}.swap" ];
|
||||
# If swap is encrypted, depending on rngd resolves a possible entropy starvation during boot
|
||||
after = mkIf (config.security.rngd.enable && sw.randomEncryption.enable) [ "rngd.service" ];
|
||||
path = [ pkgs.utillinux ] ++ optional sw.randomEncryption.enable pkgs.cryptsetup;
|
||||
|
||||
script =
|
||||
|
Loading…
Reference in New Issue
Block a user