Skip to content

Commit 25d23ef

Browse files
authored
nixos-anywhere: ensure Nix options are passed when getting substituters (#596)
2 parents 8221438 + 6188a84 commit 25d23ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nixos-anywhere.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,8 @@ main() {
10381038
10391039
# Get substituters from the machine and add them to the installer
10401040
if [[ ${machineSubstituters} == "y" && -n ${flake} ]]; then
1041-
substituters=$(nix --extra-experimental-features 'nix-command flakes' eval --apply toString "${flake}"#"${flakeAttr}".nix.settings.substituters)
1042-
trustedPublicKeys=$(nix --extra-experimental-features 'nix-command flakes' eval --apply toString "${flake}"#"${flakeAttr}".nix.settings.trusted-public-keys)
1041+
substituters=$(nix eval "${nixOptions[@]}" --apply toString "${flake}"#"${flakeAttr}".nix.settings.substituters)
1042+
trustedPublicKeys=$(nix eval "${nixOptions[@]}" --apply toString "${flake}"#"${flakeAttr}".nix.settings.trusted-public-keys)
10431043
10441044
runSsh sh <<SSH || true
10451045
mkdir -p ~/.config/nix

0 commit comments

Comments
 (0)