From 2a1dd35d138b47e192d9d5b9586994cf523b178d Mon Sep 17 00:00:00 2001 From: Elias Kohout Date: Tue, 7 Apr 2026 14:58:00 +0200 Subject: [PATCH] Fix non-NixOS installer branch: auto-detect arch and use correct home config target --- flake.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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