diff --git a/flake.nix b/flake.nix index 8bac2cb..159cfb5 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ flake-utils, nixpkgs-unstable, }: - let allSystems = ["x86_64-linux" "x86_64-darwin"]; + let allSystems = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; in flake-utils.lib.eachSystem allSystems (system: let diff --git a/nix-quick-install.sh b/nix-quick-install.sh index 12822d8..392c085 100755 --- a/nix-quick-install.sh +++ b/nix-quick-install.sh @@ -5,13 +5,28 @@ set -o pipefail source "${BASH_SOURCE[0]%/*}/vercomp.sh" +case "$(uname -m)" in + x86_64) + arch="x86_64" + ;; + arm64) + sys="aarch64" + ;; + aarch64) + arch="aarch64" + ;; + *) + echo >&2 "unsupported architecture: $(uname -m)" + exit 1 +esac + # Figure out system type (TODO don't assume x86_64) case "$OSTYPE" in darwin*) - sys="x86_64-darwin" + sys="$arch-darwin" ;; linux*) - sys="x86_64-linux" + sys="$arch-linux" ;; *) echo >& "unsupported OS type: $OSTYPE"