Nix 2.12.0 released


I’m pleased to announce the availability of Nix 2.12.0. It will be available from Download Nix / NixOS and

Here are the release notes:

  • On Linux, Nix can now run builds in a user namespace where they run as root (UID 0) and have 65,536 UIDs available. This is primarily useful for running containers such as systemd-nspawn inside a Nix build. For an example, see tests/systemd-nspawn/nix.

    A build can enable this by setting the derivation attribute:

    requiredSystemFeatures = [ "uid-range" ];

    The uid-range system feature requires the auto-allocate-uids setting to be enabled.

  • Nix can now automatically pick UIDs for builds, removing the need to create nixbld* user accounts. See auto-allocate-uids.

  • On Linux, Nix has experimental support for running builds inside a cgroup. See

  • <nix/fetchurl.nix> now accepts an additional argument impure which defaults to false. If it is set to true, the hash and sha256 arguments will be ignored and the resulting derivation will have __impure set to true, making it an impure derivation.

  • If builtins.readFile is called on a file with context, then only the parts of the context that appear in the content of the file are retained. This avoids a lot of spurious errors where strings end up having a context just because they are read from a store path (#7260).

  • nix build --json now prints some statistics about top-level derivations, such as CPU statistics when cgroups are enabled.


I presume this is Linux only, right?

1 Like

I’m excited for the new release, but installing it kinda bricked my system (Error on install: `Failed to link unit: Too many levels of symbolic links` · Issue #7415 · NixOS/nix · GitHub)… is there a way to run the 2.11.0 installer again?

EDIT: found that all the past installers are available: Channels for NixOS project(s)

Installation hiccups aside, congrats on the release Nix team!


I didn’t go through the whole thread, but a superficial look at suggests that macOS is included.

1 Like

Theoretically macOS should work but I haven’t tested it yet.


@edolstra: 4 links in your original post don’t seem to link to anything?

1 Like


Hosted by Flying Circus.