diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-01-09 18:01:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 18:01:24 +0000 |
commit | 33aa224777a5077ff1dfa4c8f4653d8aab268d76 (patch) | |
tree | 79792fd56b90e7ce3f33e57683d3ded22037ddd6 /nixos/tests | |
parent | c3115ee253aace4ffeb8d207f3c009cc92a88bd0 (diff) | |
parent | 2add5f003afd049a7c60ea33bab63d1c9d5103cf (diff) |
Merge master into staging-next
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/installer.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 5f3f61632f070..70f5c9fa00923 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -49,6 +49,8 @@ let boot.loader.systemd-boot.enable = true; ''} + boot.initrd.secrets."/etc/secret" = /etc/nixos/secret; + users.users.alice = { isNormalUser = true; home = "/home/alice"; @@ -124,6 +126,7 @@ let }", "/mnt/etc/nixos/configuration.nix", ) + machine.copy_from_host("${pkgs.writeText "secret" "secret"}", "/mnt/etc/nixos/secret") with subtest("Perform the installation"): machine.succeed("nixos-install < /dev/null >&2") @@ -131,6 +134,19 @@ let with subtest("Do it again to make sure it's idempotent"): machine.succeed("nixos-install < /dev/null >&2") + with subtest("Check that we can build things in nixos-enter"): + machine.succeed( + """ + nixos-enter -- nix-build --option substitute false -E 'derivation { + name = "t"; + builder = "/bin/sh"; + args = ["-c" "echo nixos-enter build > $out"]; + system = builtins.currentSystem; + preferLocalBuild = true; + }' + """ + ) + with subtest("Shutdown system after installation"): machine.succeed("umount /mnt/boot || true") machine.succeed("umount /mnt") |