Home Explore Blog CI



nix

1st chunk of `doc/manual/source/release-notes/rl-2.20.md`
f071210356d224352272ef0920aba26afbd72fda994c95520000000100001019
# Release 2.20.0 (2024-01-29)

- Option `allowed-uris` can now match whole schemes in URIs without slashes [#9547](https://github.com/NixOS/nix/pull/9547)

  If a scheme, such as `github:` is specified in the `allowed-uris` option, all URIs starting with `github:` are allowed.
  Previously this only worked for schemes whose URIs used the `://` syntax.

- Include cgroup stats when building through the daemon [#9598](https://github.com/NixOS/nix/pull/9598)

  Nix now also reports cgroup statistics when building through the Nix daemon and when doing remote builds using `ssh-ng`,
  if both sides of the connection are using Nix 2.20 or newer.

- Disallow empty search regex in `nix search` [#9481](https://github.com/NixOS/nix/pull/9481)

  [`nix search`](@docroot@/command-ref/new-cli/nix3-search.md) now requires a search regex to be passed. To show all packages, use `^`.

- Add new `eval-system` setting [#4093](https://github.com/NixOS/nix/pull/4093)

  Add a new `eval-system` option.
  Unlike `system`, it just overrides the value of `builtins.currentSystem`.
  This is more useful than overriding `system`, because you can build these derivations on remote builders which can work on the given system.
  In contrast, `system` also affects scheduling which will cause Nix to build those derivations locally even if that doesn't make sense.

  `eval-system` only takes effect if it is non-empty.
  If empty (the default) `system` is used as before, so there is no breakage.

- Import-from-derivation builds the derivation in the build store [#9661](https://github.com/NixOS/nix/pull/9661)

  When using `--eval-store`, `import`ing from a derivation will now result in the derivation being built on the build store, i.e. the store specified in the `store` Nix option.

  Because the resulting Nix expression must be copied back to the evaluation store in order to be imported, this requires the evaluation store to trust the build store's signatures.

- Mounted SSH Store [#7890](https://github.com/NixOS/nix/issues/7890) [#7912](https://github.com/NixOS/nix/pull/7912)

  Introduced the store [`mounted-ssh-ng://`](@docroot@/command-ref/new-cli/nix3-help-stores.md).
  This store allows full access to a Nix store on a remote machine and additionally requires that the store be mounted in the local filesystem.

- Rename `nix show-config` to `nix config show` [#7672](https://github.com/NixOS/nix/issues/7672) [#9477](https://github.com/NixOS/nix/pull/9477)

  `nix show-config` was renamed to `nix config show`, and `nix doctor` was renamed to `nix config check`, to be more consistent with the rest of the command line interface.

- Add command `nix hash convert` [#9452](https://github.com/NixOS/nix/pull/9452)

  This replaces the old `nix hash to-*` commands, which are still available but will emit a deprecation warning. Please convert as follows:

  - `nix hash to-base16 $hash1 $hash2`: Use `nix hash convert --to base16 $hash1 $hash2` instead.
  - `nix hash to-base32 $hash1 $hash2`: Use `nix hash convert --to nix32 $hash1 $hash2` instead.
  - `nix hash to-base64 $hash1 $hash2`: Use `nix hash convert --to base64 $hash1 $hash2` instead.
  - `nix hash to-sri $hash1 $hash2`: : Use `nix hash convert --to sri $hash1 $hash2` or even just `nix hash convert $hash1 $hash2` instead.

- Rename hash format `base32` to `nix32` [#9452](https://github.com/NixOS/nix/pull/9452)

  Hash format `base32` was renamed to `nix32` since it used a special Nix-specific character set for
  [Base32](https://en.wikipedia.org/wiki/Base32).

- `nix profile` now allows referring to elements by human-readable names [#8678](https://github.com/NixOS/nix/pull/8678)

  [`nix profile`](@docroot@/command-ref/new-cli/nix3-profile.md) now uses names to refer to installed packages when running [`list`](@docroot@/command-ref/new-cli/nix3-profile-list.md), [`remove`](@docroot@/command-ref/new-cli/nix3-profile-remove.md) or [`upgrade`](@docroot@/command-ref/new-cli/nix3-profile-upgrade.md) as opposed to indices. Profile element names are generated when a package is installed and remain the same until the package is removed.

Title: Nix Release 2.20.0 (2024-01-29) - New Features and Changes
Summary
This release of Nix (2.20.0) includes several new features and changes, such as allowing `allowed-uris` to match whole schemes, including cgroup stats when building through the daemon, disallowing empty search regex in `nix search`, adding a new `eval-system` setting, building the derivation in the build store when using import-from-derivation with `--eval-store`, introducing the `mounted-ssh-ng://` store, renaming `nix show-config` to `nix config show`, adding a `nix hash convert` command, renaming hash format `base32` to `nix32`, and allowing `nix profile` to refer to elements by human-readable names.