Commit Graph

1242 Commits

Author SHA1 Message Date
zowoq
36d8aacc04 nixos/test-driver: remove irrevelant comment (#455132) 2025-11-13 23:36:18 +00:00
Maximilian Bosch
52af6d5ccd nixos/lib/make-{single,multi}-disk-zfs-image: fix references to kernel modules (#460070) 2025-11-11 06:33:20 +00:00
oddlama
b615f1825d nixos/utils: Add support for LoadCredential= with genJqSecretsReplacementSnippet 2025-11-09 23:21:53 +01:00
Maximilian Bosch
20501b5a27 nixos/lib/make-{single,multi}-disk-zfs-image: fix references to kernel modules
Closes #455144

Previously, image builds with ZFS would fail with

    kernel-modules-shrunk> root module: 9p
    kernel-modules-shrunk> modprobe: FATAL: Module 9p not found in directory /nix/store/r4m7bmihmr40377yh33pn76wp9w33da2-kernel-modules/lib/modules/6.12.53

with said store-path only containing out-of-tree modules.

I'm pretty sure this was just missed to update in
f71277d66d.
2025-11-09 15:33:05 +01:00
Wolfgang Walther
f2640ee208 top-level: return __splicedPackages 2025-10-31 20:34:05 +01:00
Jared Baur
f885dcd605 nixos/test-driver: remove irrevelant comment
BaseStartCommand is no longer thing.
2025-10-26 21:57:00 -07:00
K900
e93c560b79 Merge remote-tracking branch 'origin/master' into staging-next 2025-10-05 12:17:08 +03:00
Wolfgang Walther
91a8fee3aa treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.
2025-10-05 10:52:03 +02:00
nixpkgs-ci[bot]
592e2df8c6 Merge staging-next into staging 2025-09-17 00:16:57 +00:00
K900
cf105c3841 nixos/test-driver: Crash on closed socket during connect() (#443539) 2025-09-16 22:05:37 +03:00
Will Fancher
90e7c6f90c nixos/test-driver: Crash on closed socket during connect()
If a VM crashes during `connect()`, e.g. because of `panic_on_fail`
during initrd, we would spin on the closed socket forever. We should
rasie an exception instead.
2025-09-16 14:35:26 -04:00
nixpkgs-ci[bot]
4e30eb214a Merge staging-next into staging 2025-09-15 00:18:11 +00:00
Robert Hensing
d916df7775 nixos/make-options-doc: Remove now redundant fixup
This fixes a problem where most NixOS option declaration paths started
with `nixos/modules/nixos/modules/`, which should have been only
just `nixos/modules/`.

Since dcc0ee9ea1, we use a source path
that includes both the `modules` and `nixos/modules`, so we don't need
to additionally prefix `nixos/modules` anymore.

Manually checked with

    nix-build nixos/release.nix -A options
    jq < result/share/doc/nixos/options.json '[ ."_module.args".declarations, ."meta.maintainers".declarations, ."nixpkgs.system".declarations, ."zramSwap.swapDevices".declarations ]'

Samples:

- `_module` for options defined in `lib/`
- `meta.maintainers` for options defined in `modules/`
- `nixpkgs.system` for options defined in `nixos/` with `meta.buildDocsInSandbox = false;`
- `zramSwap.swapDevices` for regular `nixos/` without that

I'm a big fan of automated tests, but in this case I am not doing that because
- the solution is a simplification, and
- no obvious place for the test, and it would couple with unrelated
  downstream code more than I would like.
2025-09-14 16:15:09 +02:00
K900
5e55633983 Merge remote-tracking branch 'origin/staging-next' into staging 2025-09-13 21:19:36 +03:00
Robert Hensing
6d521ceac9 nixos/test-driver: Add machine.get_console_log() 2025-09-12 16:46:03 +02:00
Will Fancher
f1f9ee2028 nixos/systemd: introduce settingsToSections util, migrate existing rfc42 options to use settingsToSections, migrate oomd to rfc42 (#437477) 2025-09-12 03:41:59 +00:00
Léana 江
0829ce947c nixos/eval-config: Remove NIXOS_EXTRA_MODULE_PATH
This removes the previously depricated NIXOS_EXTRA_MODULE_PATH
environment variable.

Tested with
$ nix-instantiate nixos/lib/eval-config.nix --arg modules '[{fileSystems."/".device="x";boot.loader.grub.enable=false;}]' -A config.system.build.toplevel
$ NIXOS_EXTRA_MODULE_PATH=$HOME/whatever.nix nix-instantiate nixos/lib/eval-config.nix --arg modules '[{fileSystems."/".device="x";boot.loader.grub.enable=false;}]' -A config.system.build.toplevel
2025-09-08 11:02:43 +08:00
Grimmauld
a27a433370 nixos/lib/systemd: migrate single-section attrsToSection to settingsToSections 2025-08-27 12:38:10 +02:00
Grimmauld
e88c68514d nixos/lib/systemd: introduce settingsToSections 2025-08-27 12:28:40 +02:00
dish
970dcca69c treewide: Fix links in module documentation 2025-08-25 12:55:11 -04:00
K900
041aa01117 Merge remote-tracking branch 'origin/master' into staging-next 2025-08-21 15:22:18 +03:00
Naïm Camille Favier
494a23fb73 make-{iso9660-image,squashfs,system-tarball}: drop references to build closure (#425700) 2025-08-21 12:14:26 +02:00
Robert Hensing
4d3eb9460a Factor out the NixOS meta.maintainers module (#431450) 2025-08-21 10:11:08 +02:00
K900
8eb75c9e73 Merge remote-tracking branch 'origin/master' into staging-next 2025-08-18 15:14:49 +03:00
Sizhe Zhao
c4bfbd8926 recursiveGetAttrsetWithJqPrefix: fix top level values
Co-authored-by: linyinfeng <lin.yinfeng@outlook.com>
2025-08-16 23:25:45 +08:00
nixpkgs-ci[bot]
d060c7e4de Merge master into staging-next 2025-08-13 12:07:08 +00:00
Johannes Kirschbauer
826a474d7a Doc/nixosOptionsDoc: fix baseModules cannot be empty (#430354) 2025-08-13 12:09:20 +02:00
Jeremy Kescher
a1545a073c nixos/systemd: drop kbrequest.target symlink 2025-08-12 22:50:39 +02:00
Maximilian Bosch
9b1025c7fd nixos/test-driver: always respect --dump-vsock
Before, the vsocks the test-run will use were only printed in
interactive mode. However, with `enableDebugHook = true;` this
functionality can also be used via `breakpointHook` within the build
sandbox, i.e. in the non-interactive mode.

I misremembered how much effort this is to fix, otherwise, I would've
added this to #422066 already ;)
2025-08-10 18:25:57 +02:00
Jacek Galowicz
6fe959f8ce nixos test driver: drop wrong assertion 2025-08-07 11:59:39 +02:00
Robert Hensing
dcc0ee9ea1 nixos/documentation: Allow the inclusion of a nixpkgs/modules directory 2025-08-06 14:58:50 +02:00
Johannes Kirschbauer
6f79a7af3a Doc/nixosOptionsDoc: fix baseModules cannot be empty 2025-08-02 14:10:58 +02:00
K900
ae766afdc2 nixos/display-managers: tty1 everywhere (#428972) 2025-07-29 07:32:42 +03:00
Will Fancher
570ae8423d nixos/autovt: Pull in autovt@tty1 in Nix, not generateUnits 2025-07-28 14:46:39 -04:00
Wolfgang Walther
535b720589 Merge branch 'master' into staging-next 2025-07-24 14:27:50 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Martin Weinelt
f5a40e1102 nixos/testing: fix pyflakes builtins with bash 5.3p0
Printing the file contents with `< file` does not seem to work anymore.
2025-07-23 13:13:55 +02:00
Maximilian Bosch
b4b7218254 nixos/testing: enable ssh backdoor by default if debug hook is enabled
You usually want both, so it makes sense to have the former imply the
latter. If this is not desired, it can still be modified within a test.
2025-07-18 17:39:03 +02:00
Jacek Galowicz
d6b326d659 test-driver: Implement debugging breakpoint hooks
Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
2025-07-18 17:39:01 +02:00
Michael Hoang
575a9f0e0b make-system-tarball: drop references to build closure 2025-07-16 15:31:33 +10:00
Michael Hoang
acfcf0f40b make-system-tarball: use __structuredAttrs
Based on ea81a2465e
2025-07-16 15:29:05 +10:00
Michael Hoang
f03674d868 make-squashfs: drop references to build closure 2025-07-16 13:40:02 +10:00
Michael Hoang
6c2ccf3f6e make-iso9660-image: drop references to build closure 2025-07-16 13:40:00 +10:00
Philip Taron
8279ffe622 treewide: specify that mebibytes are used when it's ambiguous (#424169) 2025-07-11 12:29:33 -07:00
Axel Karjalainen
7159ab6f43 treewide: specify where mebibytes are used when it's ambiguous 2025-07-11 00:44:23 +03:00
Wolfgang Walther
f965d36fa1 nixos/lib/test-driver: correct regex in pythonize_name() (#423064) 2025-07-09 16:01:27 +00:00
Robert Hensing
0e32661202 nixos/testing: Add test attribute to please discoverTests 2025-07-07 22:23:55 +02:00
Michael Daniels
98b97a2011 nixos/lib/test-driver: correct regex in pythonize_name()
r"[A-z]" is not equivalent to r"[A-Za-z]"; it is equivalent to r"[A-Z[]^_`a-z]".
But Python variable names cannot contain, e.g., a backtick.
So the current regex is wrong.
2025-07-06 21:09:36 -04:00
Robert Hensing
7845abc842 NixOS test framework: add overriding methods (#421480) 2025-07-06 13:40:24 +02:00
Robert Hensing
f2b3aeb383 nixos.runTest: Add extendNixOS 2025-07-06 13:39:15 +02:00