LinuxCommandLibrary

nh

nix helper tool

TLDR

Build NixOS configuration

$ nh os switch
copy
Build home-manager
$ nh home switch
copy
Build with flake
$ nh os switch --flake [.]
copy
Dry run build
$ nh os switch --dry
copy
Clean old generations
$ nh clean all
copy
Search packages
$ nh search [package]
copy

SYNOPSIS

nh [command] [options]

DESCRIPTION

nh is a Nix helper tool. It simplifies NixOS and home-manager operations.
The tool wraps common Nix commands. Provides better output and UX.

PARAMETERS

COMMAND

nh subcommand.
os ACTION
NixOS operations.
home ACTION
home-manager operations.
clean TARGET
Clean generations.
search QUERY
Search packages.
--flake PATH
Use flake at path.
--help
Display help information.

CAVEATS

Requires Nix/NixOS. Rust-based. Wrapper around nixos-rebuild.

HISTORY

nh was created to provide a better interface for common NixOS and home-manager operations.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community