diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index d97d83a1..936e100e 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -1036,16 +1036,44 @@ main() { sshConnection="root@${sshHost}" fi - # Get substituters from the machine and add them to the installer - if [[ ${machineSubstituters} == "y" && -n ${flake} ]]; then - substituters=$(nix --extra-experimental-features 'nix-command flakes' eval --apply toString "${flake}"#"${flakeAttr}".nix.settings.substituters) - trustedPublicKeys=$(nix --extra-experimental-features 'nix-command flakes' eval --apply toString "${flake}"#"${flakeAttr}".nix.settings.trusted-public-keys) - - runSsh sh <> ~/.config/nix/nix.conf -echo "extra-trusted-public-keys = ${trustedPublicKeys}" >> ~/.config/nix/nix.conf +echo "${nixConfContent}" >> ~/.config/nix/nix.conf SSH + fi fi if [[ ${phases[disko]} == 1 ]]; then