diff --git a/flake.nix b/flake.nix index 93cf2b3..02f70fb 100644 --- a/flake.nix +++ b/flake.nix @@ -189,7 +189,17 @@ if [ "$ID" != "nixos" ]; then 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" exit 0 fi