Hey all,
It’s my pleasure to announce the brand new NH 4.4.0 release, a release heavy on behavioural improvements, cleanup, CLI & ergonomic polish that we have been working on for a while. The changelog for this release is rather dense, so here’s a curated rundown of what landed since 4.3:
- PR status (now you can also do
nh search prs nh) - Backport PR
Highlights
-
Search gets a glow-up:
nh searchnow uses subcommands.
nh search packages,nh search options, and the newnh search prs,
nh search issues, andnh search offline. Experimental offline search is
powered by spam-db, while PR/issue search
hits the GitHub API directly. The--default-searchflag lets you pick the
fallback mode when no subcommand is given. No more launching a browser to
track Nixpkgs PRs! -
More passthrough flags:
--option NAME VALUE(repeatable) sets arbitrary
Nix configuration options per-invocation, e.g.--option sandbox false.
--override-input INPUT URLlets you tweak flake inputs without touching
flake.nix. Both are forwarded straight to the underlyingnixcommands. -
nh cleangets sharper:--keep-onekeeps all active direnv gcroots
alive regardless of--keep-since, so your projects don’t get collected just
because you haven’tcd’d into them recently.--cross-filesystems/-x
allows the gcroot walk to traverse mount boundaries, and--no-direnv
preserves.direnv/paths duringnh clean all. Gcroot scanning now walks
the full/nix/var/nix/gcrootstree recursively instead of just theauto
subdir, and orphaned or broken gcroots are detected and cleaned up rather than
silently ignored. -
Remote diffing:
nh os {boot,build,switch}can now compute and display
diffs when deploying to a--target-host. No more flying blind on remote
machines. If you find this fun, remember to give your special thanks to
@faukah for his awesome work on Dix -
Quality of life: Quoted attribute paths like
foo."bar.baz"are now
valid. Empty or malformed flake refs are rejected early with clear errors.
Local flake refs are validated before Nix ever runs, andNH_FLAKEnow also
triggers feature detection checks.
Fixes
-
Performance:
nh os infonow batchesnix path-infocalls into one
process instead of spawning one per generation, and uses an O(1) map lookup
for closure sizes. On systems with hundreds of generations, runtime drops from
over a minute to a few seconds. -
Elevation:
run0elevation now uses--pty-lateto avoid terminal
ownership changes that could break subsequent commands. -
Remote sudo:
nh os switch --target-host root@hostno longer wraps
activation insudowhen the SSH user is already uid 0, matching
nixos-rebuild and unblocking sudo shims likerun0-sudo-shim. -
Build output:
--no-build-output/-Qwas forwarding an unsupported
flag; it now correctly passes--quiettonix build. -
Visuals: The
indicatifspinner during remote closure copying renders
properly again, and aSubprocesscrate upgrade regression that garbled event
output has been resolved. -
Completions: Nushell completions now mark the
installableargument as a
path without breaking nh’s own flake-reference parser.
Removals
x86_64-darwinsupport has been dropped, following the same decision in
Nixpkgs.
…and much more! Remember to take a look at our changelog if you’re interested in all the new features, fixes, changes and more.
Greatful as always to everyone who contributes. Issues, patches, discussions,
and feedback all shape what nh becomes. Your feedback drives nh to greatness,
and we appreciate all of you. I’d also like to extend my thanks to everyone who
has patiently endured the wait for 4.4 ![]()
Enjoy the new NH experience, and remember to provide feedback to help us make NH
the best CLI experience for NixOS & friends!
- NotAShelf & faukah