Very first steps with Nix on Debian
Mixing Debian with Nix, my first steps.
Because Debian is currently frozen. Or, because $some_package is not (yet) available in Debian.
To install, as root, do:
apt install nix nix-setup-systemd
then, as user:
nix-channel –add https://nixos.org/channels/nixpkgs-unstable
followed by a package you wish to run from Nix. For example, Nyxt.
nix-env –install nyxt
To find this Nyxt and other applications you install via Nix, you should add the path to your shell. For example:
If this works for you, add it to your .bashrc.
If you get
error: opening lock file ‘/nix/var/nix/profiles/per-user/root/profile.lock’: Permission denied
then rm ~/.nix-profile and try again. This is probably because you tried to use nix-env or nix-channel or something while root (source).
Three basic commands to keep your Nix packages up to date:
nix-channel –update nixpkgs
nix-env -u '*'