mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
lib/tests: stage the test password file under systemd initrd
`boot.initrd.preDeviceCommands` only runs in the script-based stage 1 and is gated on `!config.boot.initrd.systemd.enable`. Tests that enable systemd initrd therefore never get `/tmp/secret.key` staged, and disko's encrypted-filesystem mount hooks fail to find the configured `passwordFile`.
This commit is contained in:
1 parent
8ebce63228
commit
baf057aa5b
1 file changed
+3
@@ -142,6 +142,9 @@ let
|
||||
boot.initrd.preDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) ''
|
||||
echo -n 'secretsecret' > /tmp/secret.key
|
||||
'';
|
||||
boot.initrd.secrets = lib.mkIf config.boot.initrd.systemd.enable {
|
||||
"/tmp/secret.key" = pkgs.writeText "secret.key" "secretsecret";
|
||||
};
|
||||
boot.consoleLogLevel = lib.mkForce 100;
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault efi;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user