Fix non-NixOS installer branch: auto-detect arch and use correct home config target

This commit is contained in:
2026-04-07 14:58:00 +02:00
parent 97f5825ab4
commit 2a1dd35d13

View File

@@ -189,7 +189,17 @@
if [ "$ID" != "nixos" ]; then if [ "$ID" != "nixos" ]; then
echo "Not on NixOS - installing home-manager only" echo "Not on NixOS - installing home-manager only"
home-manager switch --flake "$FLAKE_DIR#youruser@linux" ARCH=$(uname -m)
case "$ARCH" in
x86_64) HM_TARGET="eliaskohout@linux" ;;
aarch64) HM_TARGET="eliaskohout@linux-arm" ;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac
echo "Detected architecture: $ARCH -> using config: $HM_TARGET"
home-manager switch --flake "$FLAKE_DIR#$HM_TARGET"
echo "Home manager configured" echo "Home manager configured"
exit 0 exit 0
fi fi