17 Nix
Anthony Wang edited this page 2024-03-07 15:12:08 +00:00

Nix is a purely functional package manager for installing packages.

Configuration

Run

nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update

to configure a channel (repository).

Now add the ~/.nix-profile/bin directory to your $PATH. For Fish, you can do this with fish_add_path ~/.nix-profile/bin.

Usage

Description Command Example
List all installed packages nix-env -q nix-env -q
Query installed packages nix-env -q search_term nix-env -q librewolf
Query Available packages nix-env -qa search_term nix-env -qa calibre
Install package nix-env -iA nixpkgs.pkg_name nix-env -iA nixpkgs.sakura
Upgrade single package nix-env -u pkg_name nix-env -u librewolf
Upgrade all packages nix-env -u nix-env -u
Uninstall package nix-env -e pkg_name nix-env -e sakura

Tips and tricks

Graphical acceleration

See the ArchWiki.

Desktop integration

See the ArchWiki.