← 返回命令列表

Linux command

nh 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Build NixOS configuration

nh os switch

Build home-manager

nh home switch

Build with flake

nh os switch --flake [.]

Dry run build

nh os switch --dry

Clean old generations

nh clean all

Search packages

nh search [package]

说明

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

参数

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.

FAQ

What is the nh command used for?

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

How do I run a basic nh example?

Run `nh os switch` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does os _ACTION_ do in nh?

NixOS operations.