File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -944,6 +944,26 @@ echo "extra-trusted-public-keys = ${trustedPublicKeys}" >> ~/.config/nix/nix.con
944944SSH
945945 fi
946946
947+ # Get system-features with cpu specific architecture from the machine and add them to the installer
948+ if [[ -n ${flake} ]]; then
949+ system_features=$( nix --extra-experimental-features ' nix-command flakes' eval --apply toString " ${flake} " # "${flakeAttr}".nix.settings.system-features)
950+ if [[ -z ${system_features} ]]; then
951+ system_features=$( nix config show system-features)
952+ fi
953+ platform_arch=$( nix --extra-experimental-features ' nix-command flakes' eval --apply toString " ${flake} " # "${flakeAttr}".nixpkgs.hostPlatform.gcc.arch)
954+ if [[ -n ${platform_arch} ]]; then
955+ system_features=" ${system_features} gccarch-${platform_arch} "
956+ fi
957+
958+ # deduplicate the features
959+ system_features=$( echo " ${system_features} " | tr ' ' ' \n' | sort -u | tr ' \n' ' ' | sed ' s/ $//' )
960+
961+ runSsh sh << SSH || true
962+ mkdir -p ~/.config/nix
963+ echo "system-features = ${system_features} " >> ~/.config/nix/nix.conf
964+ SSH
965+ fi
966+
947967 if [[ ${phases[disko]} == 1 ]]; then
948968 runDisko " $diskoScript "
949969 fi
You can’t perform that action at this time.
0 commit comments