Skip to content

Commit 42e6be2

Browse files
committed
wip: let's see what breaks with systemd.enable
1 parent dd4d166 commit 42e6be2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/tests.nix

+5-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ let
8686
tsp-config = tsp-generator.config testConfigBooted;
8787
num-disks = builtins.length (lib.attrNames testConfigBooted.disko.devices.disk);
8888

89-
installed-system = { ... }: {
89+
installed-system = { config, ... }: {
9090
imports = [
9191
(lib.optionalAttrs (testMode == "direct") tsp-config)
9292
(lib.optionalAttrs (testMode == "module") {
@@ -101,11 +101,14 @@ let
101101
# config for tests to make them run faster or work at all
102102
documentation.enable = false;
103103
hardware.enableAllFirmware = lib.mkForce false;
104-
boot.initrd.preDeviceCommands = ''
104+
boot.initrd.preDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) ''
105105
echo -n 'secretsecret' > /tmp/secret.key
106106
'';
107+
boot.initrd.systemd.contents."/tmp/secret.key".text = "secretsecret";
107108
boot.consoleLogLevel = lib.mkForce 100;
108109
boot.loader.systemd-boot.enable = lib.mkDefault efi;
110+
111+
boot.initrd.systemd.enable = true;
109112
};
110113

111114
installed-system-eval = eval-config {

0 commit comments

Comments
 (0)