Skip to content

Commit d8dbb71

Browse files
committed
release notes: 2.26.0
1 parent b8c296f commit d8dbb71

File tree

7 files changed

+76
-81
lines changed

7 files changed

+76
-81
lines changed

doc/manual/rl-next/ignore-local-registries.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

doc/manual/rl-next/nix-copy-flags.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

doc/manual/rl-next/nix-instantiate-raw.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

doc/manual/rl-next/nix-sshopts-parsing.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

doc/manual/rl-next/relative-path-flakes.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

doc/manual/source/SUMMARY.md.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
- [Contributing](development/contributing.md)
131131
- [Releases](release-notes/index.md)
132132
{{#include ./SUMMARY-rl-next.md}}
133+
- [Release 2.26 (2025-01-22)](release-notes/rl-2.26.md)
133134
- [Release 2.25 (2024-11-07)](release-notes/rl-2.25.md)
134135
- [Release 2.24 (2024-07-31)](release-notes/rl-2.24.md)
135136
- [Release 2.23 (2024-06-03)](release-notes/rl-2.23.md)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Release 2.26.0 (2025-01-22)
2+
3+
- Support for relative path inputs [#10089](https://github.com/NixOS/nix/pull/10089)
4+
5+
Flakes can now refer to other flakes in the same repository using relative paths, e.g.
6+
```nix
7+
inputs.foo.url = "path:./foo";
8+
```
9+
uses the flake in the `foo` subdirectory of the referring flake. For more information, see the documentation on [the `path` flake input type](@docroot@/command-ref/new-cli/nix3-flake.md#path-fetcher).
10+
11+
This feature required a change to the lock file format. Previous Nix versions will not be able to use lock files that have locks for relative path inputs in them.
12+
13+
- Flake lock file generation now ignores local registries [#12019](https://github.com/NixOS/nix/pull/12019)
14+
15+
When resolving indirect flake references like `nixpkgs` in `flake.nix` files, Nix will no longer use the system and user flake registries. It will only use the global flake registry and overrides given on the command line via `--override-flake`.
16+
17+
This avoids accidents where users have local registry overrides that map `nixpkgs` to a `path:` flake in the local file system, which then end up in committed lock files pushed to other users.
18+
19+
In the future, we may remove the use of the registry during lock file generation altogether. It's better to explicitly specify the URL of a flake input. For example, instead of
20+
```nix
21+
{
22+
outputs = { self, nixpkgs }: { ... };
23+
}
24+
```
25+
write
26+
```nix
27+
{
28+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
29+
outputs = { self, nixpkgs }: { ... };
30+
}
31+
```
32+
33+
- `nix copy` supports `--profile` and `--out-link` [#11657](https://github.com/NixOS/nix/pull/11657)
34+
35+
The `nix copy` command now has flags `--profile` and `--out-link`, similar to `nix build`. `--profile` makes a profile point to the
36+
top-level store path, while `--out-link` create symlinks to the top-level store paths.
37+
38+
For example, when updating the local NixOS system profile from a NixOS system closure on a remote machine, instead of
39+
```
40+
# nix copy --from ssh://server $path
41+
# nix build --profile /nix/var/nix/profiles/system $path
42+
```
43+
you can now do
44+
```
45+
# nix copy --from ssh://server --profile /nix/var/nix/profiles/system $path
46+
```
47+
The advantage is that this avoids a time window where *path* is not a garbage collector root, and so could be deleted by a concurrent `nix store gc` process.
48+
49+
- `nix-instantiate --eval` now supports `--raw` [#12119](https://github.com/NixOS/nix/pull/12119)
50+
51+
The `nix-instantiate --eval` command now supports a `--raw` flag, when used
52+
the evaluation result must be a string, which is printed verbatim without
53+
quotation marks or escaping.
54+
55+
- Improved `NIX_SSHOPTS` parsing for better SSH option handling [#5181](https://github.com/NixOS/nix/issues/5181) [#12020](https://github.com/NixOS/nix/pull/12020)
56+
57+
The parsing of the `NIX_SSHOPTS` environment variable has been improved to handle spaces and quotes correctly.
58+
Previously, incorrectly split SSH options could cause failures in commands like `nix-copy-closure`,
59+
especially when using complex SSH invocations such as `-o ProxyCommand="ssh -W %h:%p ..."`.
60+
61+
This change introduces a `shellSplitString` function to ensure
62+
that `NIX_SSHOPTS` is parsed in a manner consistent with shell
63+
behavior, addressing common parsing errors.
64+
65+
For example, the following now works as expected:
66+
67+
```bash
68+
export NIX_SSHOPTS='-o ProxyCommand="ssh -W %h:%p ..."'
69+
```
70+
71+
This update improves the reliability of SSH-related operations using `NIX_SSHOPTS` across Nix CLIs.
72+
73+
# Contributors
74+
75+
Querying GitHub API for f0c209fb14cb511370ea2b7787d9a8dd90070162, to get handle for [email protected]

0 commit comments

Comments
 (0)