Fix non-NixOS installer branch: auto-detect arch and use correct home config target
This commit is contained in:
12
flake.nix
12
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
|
||||
|
||||
Reference in New Issue
Block a user