Skip to content

Commit

Permalink
only set boot.initrd.preDeviceCommands if we boot with script-based s…
Browse files Browse the repository at this point in the history
…tage1
  • Loading branch information
Mic92 committed Oct 1, 2024
1 parent 91cd091 commit fc3ba69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ let
tsp-config = tsp-generator.config testConfigBooted;
num-disks = builtins.length (lib.attrNames testConfigBooted.disko.devices.disk);

installed-system = { ... }: {
installed-system = { config, ... }: {
imports = [
(lib.optionalAttrs (testMode == "direct") tsp-config)
(lib.optionalAttrs (testMode == "module") {
Expand All @@ -101,7 +101,8 @@ let
# config for tests to make them run faster or work at all
documentation.enable = false;
hardware.enableAllFirmware = lib.mkForce false;
boot.initrd.preDeviceCommands = ''
# FIXME: we don't have an systemd in stage-1 equialvent for this
boot.initrd.preDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) ''
echo -n 'secretsecret' > /tmp/secret.key
'';
boot.consoleLogLevel = lib.mkForce 100;
Expand Down

0 comments on commit fc3ba69

Please sign in to comment.