mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 20:49:52 +03: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}";
|
{ description = "Initialisation of swap device ${sw.device}";
|
||||||
wantedBy = [ "${realDevice'}.swap" ];
|
wantedBy = [ "${realDevice'}.swap" ];
|
||||||
before = [ "${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;
|
path = [ pkgs.utillinux ] ++ optional sw.randomEncryption.enable pkgs.cryptsetup;
|
||||||
|
|
||||||
script =
|
script =
|
||||||
|
Loading…
Reference in New Issue
Block a user