# NH v4 Announcement

**URL:** https://discourse.nixos.org/t/nh-v4-announcement/66062
**Category:** Announcements
**Created:** [June 25, 2025, 12:43pm UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062 "2025-06-25T12:43:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![viperML](https://discourse.nixos.org/user_avatar/discourse.nixos.org/viperml/32/34002_2.png) [@viperML](https://discourse.nixos.org/u/viperML)
#### Post date: [June 25, 2025, 12:43pm UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/1 "2025-06-25T12:43:16Z")

</div>

Hello again 👋

@notashelf and I, along with all the NH contributors, want to present the latest version of NH. (It’s been a while since 4.0 was pushed into nixpkgs, but we never did an announcement).

As a refresher, NH is a CLI tool that rewrites some NixOS commands, improving ergonomics and user experience. For example, `nh os switch` is the `nixos-rebuild` equivalent, but it shows a tree of all builds, which packages are upgraded, and asks for confirmation. Check the readme and don’t forget to give us a star ⭐ [GitHub - nix-community/nh: Yet another Nix CLI helper. [Maintainers=@viperML, @NotAShelf]](https://github.com/nix-community/nh)

Notable features for v4:

- Added support for Nix-Darwin with the new `nh darwin {switch, repl}` commands.
- Support for any installable; NH is now not flake-only (e.g. `nh os switch -f ./config.nix`).
- Remote deployments with `nh os --target-host`.
- Update flake inputs with `--update`.
- List the system’s generations with `nh os info`.
- Rollback your system with `nh os rollback`.
- NH is now a nix-community project; you are invited to contribute to this humble Rust project.
- Many bug fixes and improvements.

You can try it now directly from nixpkgs: `nix shell nixpkgs#nh`. If you have any questions or suggestions, please let us know 👍

---

<div class="post-metadata">

### Author: ![mightyiam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mightyiam/32/33998_2.png) [@mightyiam](https://discourse.nixos.org/u/mightyiam)
#### Post date: [June 25, 2025, 12:59pm UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/2 "2025-06-25T12:59:19Z")

</div>

I’ve been using this for NixOS! 🙏

---

<div class="post-metadata">

### Author: ![pbek](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pbek/32/9122_2.png) [@pbek](https://discourse.nixos.org/u/pbek)
#### Post date: [June 25, 2025, 1:26pm UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/3 "2025-06-25T13:26:52Z")

</div>

I love nh, and am still dreaming of support for a `nh os --build-host` parameter. 😌

---

<div class="post-metadata">

### Author: ![Brisingr05](https://discourse.nixos.org/user_avatar/discourse.nixos.org/brisingr05/32/29307_2.png) [@Brisingr05](https://discourse.nixos.org/u/Brisingr05)
#### Post date: [June 25, 2025, 2:30pm UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/4 "2025-06-25T14:30:21Z")

</div>

`--build-host` does exist.

---

<div class="post-metadata">

### Author: ![pbek](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pbek/32/9122_2.png) [@pbek](https://discourse.nixos.org/u/pbek)
#### Post date: [June 25, 2025, 6:01pm UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/5 "2025-06-25T18:01:33Z")

</div>

It doesn’t show up in `nh os build --help` 🤔

```
error: unrecognised flag '--build-host'

```

---

<div class="post-metadata">

### Author: ![Brisingr05](https://discourse.nixos.org/user_avatar/discourse.nixos.org/brisingr05/32/29307_2.png) [@Brisingr05](https://discourse.nixos.org/u/Brisingr05)
#### Post date: [June 26, 2025, 1:19am UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/6 "2025-06-26T01:19:43Z")

</div>

Maybe you’re using an older version?

```auto
brisingr@manin ~> nh --version
nh 4.1.1
brisingr@manin ~> nh os build --build-host
error: a value is required for '--build-host <BUILD_HOST>' but none was supplied

For more information, try '--help'.
brisingr@manin ~ [2]> 

```

---

<div class="post-metadata">

### Author: ![pbek](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pbek/32/9122_2.png) [@pbek](https://discourse.nixos.org/u/pbek)
#### Post date: [June 26, 2025, 4:59am UTC](https://discourse.nixos.org/t/nh-v4-announcement/66062/7 "2025-06-26T04:59:48Z")

</div>

You are absolutely right! In my nixcfg directory, nh was pinned was locked to 4.0.0 by devenv, while I have nh 4.1.1! Thank you very much!
