Hello all,
I’m excited to announce the release of NH 4.2.0! This release brings a plethora of improvements, user-requested features and bugfixes across the board to make your NH experience even smoother.
(Nixpkgs PR open merged)
Highlights
-
More Powerful and Flexible Updates: The
--update-inputflag can now be specified multiple times, and no longer requires--update. Both are now mutually exclusive for clarity. -
Enhanced Diffing: The switch from
nvdtodixmeans package diffs are now faster and more reliable. Plus, there’s a new--diffflag to control when diffs are shown (auto,always,never). -
Manpages Now Available: NH now ships with manpages! If your package vendor provides them, you’ll have quick access with
man 1 nh. The manpages contain helpful examples and more elaborate command reference that you would normally refer to the README for -
Better Privilege Escalation : NH tries alternative methods (
doas,run0, and fallbackpkexec) ifsudoisn’t available, and now properly prompts for your password during remote deploys. This has been a long-requested feature and thanks to@henriquekirchheckit has been made available in 4.2.0
-
Improved Error Handling and Debugging: Debug output is more verbose (stackable
-vflags), and error/context messages have been upgraded throughout NH. -
Darwin Improvements:
nh darwin switchnow shows the full output fromdarwin-rebuild, for clearer activation handling -
Faster and Smarter Cleaning:
nh cleanskips missing directories gracefully and is ~4% faster on average. Thank you@khanelimanfor this.
Fixes
-
Version Handling
NH now properly detects non-semver version strings and skips checks with a warning instead of failing. -
More Informative Errors
Disablingsystem.switchnow provides a more descriptive error message. -
Environment Isolation
Environment variables passed to commands are now carefully selected, fixing issues like “$HOMEis not owned by you!`” (#314). -
Activation Race Condition
Fixed a tempdir race that could cause activation failures (#386).
Full Changelog
For a detailed list of all changes, additions, and fixes in 4.2.0, see the CHANGELOG.
Thank you everyone who has contributed to and tested this release. This release would not be possibe without the many contributors that submitted bug reports, PRs or simply discussed NH. I appreciate all of you, and as always, please report any issues or feedback on GitHub.
Happy Nixxing
- NotAShelf