nh
Modern helper utility tool for the Nix/NixOS ecosystem. Some subcommands such as `os`, `home`, `clean`, `search` have their own usage documentation.
More info →Subcommands (4)
Clean Nix profiles and delete unused and unreachable Nix store paths. Generations can be listed using `nix-env --list-generations` or `nh os info`.
Manage and configure per-user environment using Nix. Reimplementation of `home-manager`.
Reconfigure or debug a NixOS machine.
Search for packages in Nixpkgs.
Options (2)
-H, --hostnamebooleanBuild and switch to a nix-darwin flake configuration
nh darwin switch {{path/to/flake}} {{[-H|--hostname]}} {{host}}-a, --askbooleanCollect all garbage and gcroots from the Nix store
nh clean all {{[-a|--ask]}}Examples (6)
Build and switch to a specified NixOS flake configuration
nh os switch path/to/flakeBuild and switch to a specified Home Manager flake configuration
nh home switch path/to/flakeBuild and switch to a nix-darwin flake configuration
Collect all garbage and gcroots from the Nix store
nh clean all [-a|--ask]Search for a package in Nixpkgs
nh search nameGenerate shell completions for a specified shell
nh completions shell