I am struggling to install nix on a mac with m1. I have checked out all the related issues, but I am not sure what to do to install properly as an end-user
Maybe possible to use it as x86_64 with Rosetta though? But that seems hugely inefficient since it presumably forces all installed software to also run as x86_64. Happy to hear counter-arguments though
You should be able to curl -L https://nixos.org/nix/install | sh yourself into nix on M1 now. (not sure if the /nix mount is still an issue, don’t own an M1)
error: Package ‘ghc-8.10.4’ in /nix/store/m62zfwzwss5bap5ly32w5rmnncypfjd5-nixpkgs/nixpkgs/pkgs/development/compilers/ghc/8.10.4.nix:267 is not supported on ‘aarch64-darwin’, refusing to evaluate.
use export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 still not work
error: cannot bootstrap GHC on this platform
(use '--show-trace' to show detailed location information)
i hope nix will can install only support x86_64 package with Rosetta
The release candidate is available in nixpkgs-unstable as nix_2_4. As long as you have access to nixpkgs-unstable somehow (channels, flake, etc), you can install it into your environment with nix-env or set nix.packages to nix_2_4 if you’re using nix-darwin.
I closed my terminal and reopened to make sure I was in a new session and when I typed nix-env I received zsh: command not found: nix-env
I look in my home directory and i do not see any nix sym links
I see that nix is not in my $PATH
I do see that nix has been installed in my root and I can cd into cd /nix/var/nix/profiles/default/etc/profile.d
I thought after the install appeared to be successful I could just use nix but this does not seem to be the case. How can I add nix to my path so I can start using the nix-env command?
The installer presumably added nix to your /etc/bashrc and /etc/zshrc, but something already in your profile scripts either prevents it from running, or overwrites the PATH after it does.