1455 Commits

Author SHA1 Message Date
Peter Bynum
eaac7e1504 nixos/test-driver: coerced testScript merging 2026-08-24 12:07:00 -04:00
nixpkgs-ci[bot]
4bb5b8092f Merge master into staging-nixos 2026-08-22 18:05:21 +00:00
Ihar Hrachyshka
abaaf7dfe3 nixos/tests: mark nspawn tests as Linux-only 2026-08-21 18:44:48 -04:00
Maximilian Bosch
29c3f283d0 nixos/test-driver: keep streaming a container journal that is slow to appear (#554430) 2026-08-21 15:54:31 +00:00
Maximilian Bosch
800dbaea4e nixos/lib/testing: don't require kvm if only containers are specified (#538271) 2026-08-21 13:51:40 +00:00
cinereal
d700b4d24f nixos/test-driver: keep streaming a container journal that is slow to appear
Poll for nspawn containers' journal for as long as needed rather than giving up
after ten seconds, ensuring we can still get output on slower nodes.

Before this change, resource-constrained environments or node parallelism could
make for a situation where it gave up before they loaded, preventing output
for the rest of the run.

Assisted-by: Claude:claude-opus-5
2026-08-20 00:56:35 +02:00
quantenzitrone
93a668bc54 squashfs-tools: rename from squashfsTools, enable structuredAttrs
upstream package is called squashfs-tools and other distros also call the package this way https://repology.org/project/squashfs-tools
2026-08-17 14:32:21 +02:00
aszlig
7c7e795df1 nixos/test-driver: Use types.lines for testScript
I usually write extensive test modules and more often than not, I want
to use something like this:

  testScript = lib.mkBefore ''
    ... some common initialisation ...
  '';

Unfortunately, the type of testScript is types.str, so right now I'm
working around this using ugly things like this:

  options.testScript = lib.mkOption {
    type = let
      newType = types.either types.lines (types.functionTo types.lines);
    in newType // {
      typeMerge = lib.const newType;
    };
  };

While this results in roughly the same (using types.lines instead of
types.str), I should not have to do this downstream, so hereby let's
make it types.lines.

Signed-off-by: aszlig <aszlig@nix.build>
2026-08-13 01:03:13 +02:00
Ryan Hendrickson
1e7ede313f utils.mkStateRevisionOption: replace table with ol
Use an ordered list in the description of options created by
utils.mkStateRevisionOption instead of a table. The man page renderer
(for `man configuration.nix`) does not support generating tables, even
though the HTML renderer does.
2026-08-12 15:38:15 -04:00
Ryan Hendrickson
7532d3bfc2 Reapply "nixos/seerr: use lib.mkStateRevisionOption"
This reverts commit 8820b84c40.
2026-08-12 15:38:03 -04:00
Aliaksandr
9921d05da3 treewide: replace stdenv.is* with stdenv.hostPlatform.is*
Assisted-by: claude-code with claude-opus-4-8
2026-08-12 20:27:00 +02:00
nixpkgs-ci[bot]
88f341688a Merge master into staging-nixos 2026-08-08 18:09:13 +00:00
K900
8820b84c40 Revert "nixos/seerr: use lib.mkStateRevisionOption" 2026-08-08 18:36:46 +03:00
nixpkgs-ci[bot]
9e99dc6829 Merge master into staging-nixos 2026-08-08 00:17:04 +00:00
Ryan Hendrickson
e060fe4584 nixos/seerr: use lib.mkStateRevisionOption (#509450) 2026-08-07 18:32:51 +00:00
Maximilian Bosch
d9befc6484 nixos/test-driver: fix deprecation behavior
We have a lot of changes in the style of

    def foo(
      self,
      new: dt.timedelta | None = None,
      old: float | None = None,
    )

which is OK for cases where the API is used as

    foo(old=23.5)

however for named arguments that actually falls short in the `ty`-stage:

    foo(23.5)

As a workaround I flipped the order of old/new and changed the type of
`old` to accept both a timedelta and the old type, i.e.

    def foo(
      self,
      old: float | dt.timedelta | None = None,
      new: dt.timedelta | None = None,
    )

and only give a deprecation warning if `old` is not of type `dt.timedelta | None`.

That way, both

    foo(old=23.5)
    foo(23.5)

are still accepted, at the same time, both

    foo(new=timedelta(...))
    foo(timedelta(...))

are OK.
2026-08-07 15:52:09 +02:00
jtrrll
f31483b7b2 nixos/test-driver: use timedelta for timeouts and durations 2026-08-05 10:07:38 -04:00
Arian van Putten
a6509f0e11 Darwin linux-builder drop-in solution with Rosetta support (#544193) 2026-08-04 09:10:00 +00:00
Maximilian Bosch
f6852ecda0 nixos/test-driver: read test script from store instead of env var (#544299) 2026-07-31 17:51:40 +00:00
Maximilian Bosch
db255f6255 nixos-test-driver: Drop temporary directory in copy_from_machine (#544864) 2026-07-31 09:44:25 +00:00
Jacek Galowicz
325e6b2331 qemu-vm and vz-vm: deduplicate erofs image creation 2026-07-30 18:53:40 +02:00
Sam Pointon
629b4ee093 systems: rename extant wasi targets to wasip1
Wasi P2 is different enough to Wasi P1 to warrant being treated entirely 
separately, rather than as two minor variants of the same thing. P3 will 
likewise want to be a different target.

I've left aliases in place; maybe eventually, those can be deprecated 
and removed. I've tested this, but it's possible there might be breakage 
somewhere (e.g., the canonical doubles for P1 have changed, though I 
can't imagine why anyone would rely on that).

Fixes https://github.com/NixOS/nixpkgs/issues/435954
2026-07-28 19:50:03 +01:00
Philip Taron
7abee75685 nixos/eval-config: remove deprecated parameters (#539157) 2026-07-27 19:50:45 +00:00
Philip Taron
95d6d4e2c6 nixos/lib/systemd-lib: remove optionalAttrs chain (#542083) 2026-07-27 19:17:46 +00:00
Eman Resu
5c483d4767 various: partially apply prefix/suffix/infix checks (#543869) 2026-07-26 21:41:24 +00:00
Jacek Galowicz
dcd832018a nixos/test-driver: fix corrupt hosts files (#545014) 2026-07-26 07:10:12 +00:00
Alyssa Ross
beeb739e48 nixos/test-driver: fix corrupt hosts files
primaryIPAddress is defined using lib.optionalString.  If it is the
empty string (because there are no assigned IP addresses), and the
machine has a hostname, we don't want to generate an invalid hosts
file with that empty string as the first (IP address) field.
2026-07-23 22:25:21 +02:00
Peter Bynum
50ec0c0d9b nixos-test-driver: Drop temporary directory in copy_from_machine 2026-07-23 09:50:36 -04:00
nixpkgs-ci[bot]
6d4751efc4 Merge master into staging-nixos 2026-07-22 00:31:17 +00:00
Maximilian Bosch
483f2db40a nixos/testing: allow meta.teams in tests, fix maintainer pings for tests (#540388) 2026-07-21 21:42:07 +00:00
adisbladis
004d8397a9 nixos/test-driver: read test script from store instead of env var
The env var approach caps out at 128K which makes large test scripts fail checks with:
```
error: executing '.../bin/bash': Argument list too long
```

The script already exists in the store, let's use that.
2026-07-21 20:14:24 +02:00
Winter
bb32156587 nixos/lib/testing: don't require kvm if only containers are specified
Allows containers to be run on systems that don't have the `kvm` feature enabled,
like VMs that don't support nested virt.
2026-07-20 20:24:21 -04:00
Winter
244057cf9f nixos/lib/testing: `builtins.length (lib.attrNames ...) > 0 -> != to the empty set 2026-07-20 20:24:21 -04:00
lassulus
3018f55da9 nixos-test-driver: reintroduce --test-script flag (#533988) 2026-07-20 14:30:44 +00:00
Eman Resu
ee166fb182 nixos/lib/utils: partially apply hasPrefix 2026-07-20 10:30:08 -04:00
Eman Resu
0fed0563f6 nixos/lib/utils: partially apply hasSuffix and removeSuffix
Also move helpers to higher scope.
2026-07-20 10:30:04 -04:00
Eman Resu
02e0629f57 nixos/lib/systemd-lib: remove optionalAttrs chain 2026-07-15 01:22:39 -04:00
Robert Schütz
aeba2fa7b6 nixos/systemd: allow listenStreams to contain ports 2026-07-10 10:55:22 -07:00
Maximilian Bosch
93b2178163 nixos/testing: allow meta.teams in tests, fix maintainer pings for tests
With this patch I essentially get the expected list of maintainers for changes in
nixos-tests.

The downside of this approach is that the CI facility assumes that
there's at most a single definition of `meta.maintainers`, however it
can be more in a module-system context.

For simplicity, just use the first definition location for the time
being.

Verified with

    let
      lib = import ./lib;
      maintainers = import ./ci/eval/compare/maintainers.nix { inherit lib; };
    in
    maintainers {
      changedFiles = [
	"nixos/tests/matrix/matrix-authentication-service.nix"
      ];
      affectedAttrPaths = map (lib.splitString ".") [
	"nixosTests.matrix-authentication-service"
      ];
    }
2026-07-10 16:29:13 +02:00
Vladimír Čunát
4bddd7068b Merge master into staging-next 2026-07-08 16:42:08 +02:00
Martin Weinelt
e97294ecc7 nixos/nixpkgs: add zstd flavored nixexprs tarballs (#535272) 2026-07-08 14:23:04 +00:00
Martin Weinelt
54dc8286f9 {nixos/channel,make-tarball.nix}: argue for unbounded compression threads 2026-07-08 10:34:14 +02:00
Eman Resu
37ba552065 nixos/eval-config: remove deprecated extraArgs and check parameters 2026-07-07 01:29:51 -04:00
nixpkgs-ci[bot]
1b4836a2ba Merge master into staging-next 2026-07-05 06:14:54 +00:00
Maximilian Bosch
26bafa1f8d nixos/test-driver: deprecate shell_interact() (#535097) 2026-06-29 13:05:59 +00:00
Maximilian Bosch
5da4d05168 nixos/test-driver: keep nspawn notify socket drained after boot (#533429) 2026-06-29 10:33:21 +00:00
K900
caea65bc86 Merge remote-tracking branch 'origin/master' into staging-next 2026-06-27 17:13:58 +03:00
Maximilian Bosch
59249b1624 nixos/test-driver: show deprecation warnings in the REPL
Apparently this wasn't the case before, but now it is

    In [3]: machine.shell_interact()
    ??? Warning (DeprecationWarning): Use the SSH backdoor instead
        File "<ipython-input-3-4e72ea6a987e>", line 1
2026-06-26 12:27:42 +02:00
Maximilian Bosch
b9706678ac nixos/test-driver: deprecate shell_interact()
Reviewing #512771 got me thinking and I'm not sure I see a good reason
to keep this method given the SSH backdoor functionality has a much
better UX.

I'd propose we deprecate it, await 26.11 to see if people complain and
remove it alltogether after that.
2026-06-26 12:27:41 +02:00
Martin Weinelt
290af9f23f nixos/channel: apply reproducibility fixes from make-tarball.nix
These changes are ported from 72e89d7461, f7672530de and
e309661586.
2026-06-26 11:22:20 +02:00