diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-07-07 23:12:39 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-07-07 23:12:39 +0200 |
commit | 61afc4d1662fe426f02b28e386f2e053f887b6d6 (patch) | |
tree | 537bc98140027a2103caaf701788b1ab87591c2d /nixos/tests/installer.nix | |
parent | d00e242b805a5580e542dd5fb7c6b3e035be8697 (diff) | |
download | nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.tar nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.tar.gz nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.tar.bz2 nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.tar.lz nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.tar.xz nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.tar.zst nixpkgs-61afc4d1662fe426f02b28e386f2e053f887b6d6.zip |
nixos/nix-channel: Take care of NIX_PATH's non-empty default when disabled
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r-- | nixos/tests/installer.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 38a9da13bcd..5c6b70732fe 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -338,6 +338,18 @@ let with subtest("nix-channel command is not available anymore"): machine.succeed("! which nix-channel") + # Note that the channel profile is still present on disk, but configured + # not to be used. + with subtest("builtins.nixPath is now empty"): + machine.succeed(""" + [[ "[ ]" == "$(nix-instantiate builtins.nixPath --eval --expr)" ]] + """) + + with subtest("<nixpkgs> does not resolve"): + machine.succeed(""" + ! nix-instantiate '<nixpkgs>' --eval --expr + """) + with subtest("Evaluate flake config in fresh env without nix-channel"): machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz") |