I have working nix installations on MacOS, Arch Linux, and NixOS on a Raspberry Pi 3.
Today I wanted to install the package manager on a Raspberry Pi running Raspbian and thought it would be no sweat.
Following the instructions at https://nixos.org/download.html#download-nix for a multi-user install:
sh <(curl -L https://nixos.org/nix/install) --daemon
I allowed it to use
sudo when requested.
It looks like the installation worked, so I reboot, but I’m getting
-bash: nix: command not found.
Digging around, I find that nix is installed for
root and works fine:
$ sudo -i nix-shell -p nix-info --run "nix-info -m" bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /nix/store/addlxsbl7ycab3zbkb0wq6a74487pncm-bash-5.1-p16/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) - system: `"aarch64-linux"` - host os: `Linux 5.10.103-v8+, Debian GNU/Linux, 11 (bullseye), nobuild` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.11.1` - channels(root): `"nixpkgs"` - nixpkgs: `/root/.nix-defexpr/channels/nixpkgs`
but not installed under my user:
$ sudo ls -l /root/.nix-profile lrwxrwxrwx 1 root root 29 Oct 7 13:46 /root/.nix-profile -> /nix/var/nix/profiles/default $ ~/.nix-profile -bash: /home/n8henrie/.nix-profile: No such file or directory
Did I do something wrong? If memory serves, on Arch it went ahead and installed to my regular user.