systemd-initrd: Support secrets when boot loader doesn't

initrd-secrets: Fix service config with systemd-stage-1
This commit is contained in:
Will Fancher
2022-08-08 19:09:37 -04:00
parent 71983a6eb5
commit fef26d88e2
4 changed files with 5 additions and 7 deletions

View File

@@ -880,6 +880,8 @@ in
boot.initrd.kernelModules = optionals (cfg.useNixStoreImage && !cfg.writableStore) [ "erofs" ];
boot.loader.supportsInitrdSecrets = mkIf (!cfg.useBootLoader) (mkVMOverride false);
boot.initrd.extraUtilsCommands = lib.mkIf (cfg.useDefaultFilesystems && !config.boot.initrd.systemd.enable)
''
# We need mke2fs in the initrd.