[Security/Encryption] almos-force systemd stage-1 init if encryption is enabled

Also copy /etc/crypttab from initrd to regular /etc
This commit is contained in:
Antoine Viallon 2023-11-07 21:30:04 +01:00
parent 79853e531b
commit 390e3fb0ba
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -17,6 +17,14 @@ in {
cfg.cryptsetup.package
];
boot.initrd.systemd.contents."/etc/crypttab".text = mkDefault "";
environment.etc.crypttab = {
text = config.boot.initrd.systemd.contents."/etc/crypttab".text;
};
boot.initrd.systemd.enable = mkOverride 10 true;
boot.initrd.availableKernelModules = [ "cryptd" ];
};
}