about summary refs log tree commit diff
path: root/nixos/doc/manual
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2024-02-25 21:08:19 +0100
committerGitHub <noreply@github.com>2024-02-25 21:08:19 +0100
commit5337ff6a805900a9b2efb9bd2c0252561a79da82 (patch)
tree70fac2619e2dd1ba7c4b257adeb23b58bd266346 /nixos/doc/manual
parent5a7e08cd83dc81cd10fb8b021109329d68b53e5d (diff)
parente456032addae76701eb17e6c03fc515fd78ad74f (diff)
downloadnixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.tar
nixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.tar.gz
nixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.tar.bz2
nixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.tar.lz
nixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.tar.xz
nixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.tar.zst
nixlib-5337ff6a805900a9b2efb9bd2c0252561a79da82.zip
Merge pull request #254405 from lf-/jade/nix-path-flakes
nixos/flake: set up NIX_PATH and system flake registry automatically
Diffstat (limited to 'nixos/doc/manual')
-rw-r--r--nixos/doc/manual/release-notes/rl-2405.section.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md
index ef7085d84967..b5973c19a2c4 100644
--- a/nixos/doc/manual/release-notes/rl-2405.section.md
+++ b/nixos/doc/manual/release-notes/rl-2405.section.md
@@ -20,6 +20,14 @@ In addition to numerous new and upgraded packages, this release has the followin
    - This can be disabled through the `environment.stub-ld.enable` option.
    - If you use `programs.nix-ld.enable`, no changes are needed. The stub will be disabled automatically.
 
+- On flake-based NixOS configurations using `nixpkgs.lib.nixosSystem`, NixOS will automatically set `NIX_PATH` and the system-wide flake registry (`/etc/nix/registry.json`) to point `<nixpkgs>` and the unqualified flake path `nixpkgs` to the version of nixpkgs used to build the system.
+
+  This makes `nix run nixpkgs#hello` and `nix-build '<nixpkgs>' -A hello` work out of the box with no added configuration, reusing dependencies already on the system.
+
+  This may be undesirable if nix commands are not going to be run on the built system since it adds nixpkgs to the system closure. For such closure-size-constrained non-interactive systems, this setting should be disabled.
+
+  To disable this, set [nixpkgs.flake.setNixPath](#opt-nixpkgs.flake.setNixPath) and [nixpkgs.flake.setFlakeRegistry](#opt-nixpkgs.flake.setFlakeRegistry) to false.
+
 - Julia environments can now be built with arbitrary packages from the ecosystem using the `.withPackages` function. For example: `julia.withPackages ["Plots"]`.
 
 - A new option `systemd.sysusers.enable` was added. If enabled, users and