-
A new
nh os rollbacksubcommand has been added to allow rolling back a generation, or to a specific generation with the--toflag. Seenh os rollback --helpfor more details on this subcommand. -
Nh now supports the
--build-hostand--target-hostcli arguments -
Nh now checks if the current Nix implementation has necessary experimental features enabled. In mainline Nix (CppNix, etc.) we check for
nix-commandandflakesbeing set. In Lix, we also userepl-flakeas it is still provided as an experimental feature in versions below 2.93.0. -
Nh will now check if you are using the latest stable, or "recommended," version of Nix (or Lix.) This check has been placed to make it clear we do not support legacy/vulnerable versions of Nix, and encourage users to update if they have not yet done so.
-
NixOS: Nh now accepts the subcommand
nh os build-vm, which builds a virtual machine image activation script instead of a full system. This includes a new option--with-bootloader/-Bthat applies to just build-vm, to build a VM with a bootloader.
- Darwin: Use
darwin-rebuilddirectly for activation instead of old scripts - Darwin: Future-proof handling of
activate-userscript removal - Darwin: Improve compatibility with root-only activation in newer nix-darwin versions
- NixOS: Check if the target hostname matches the running system hostname before
running
nvdto compare them.
- Nh now supports specifying
NH_SUDO_ASKPASSto pass a custom value toSUDO_ASKPASSin self-elevation. If specified,sudowill be called with-Aand theNH_SUDO_ASKPASSwill beSUDO_ASKPASSlocally.
- Fix
--configurationbeing ignored innh home switch(#262)
- Add
--jsontonh search, which will return results in JSON format. Useful for parsing the output ofnh searchwith, e.g., jq.
- NixOS 24.05 is now marked as deprecated, and will emit an error if the search command attempts to use it for the channel. While the Elasticsearch backend still seems to support 24.05, it is deprecated in Nixpkgs and is actively discouraged. Please update your system at your earliest convenience.