about summary refs log tree commit diff
path: root/nixos/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-02-29nixos/lib/testing: remove another source of unnecessary test rebuildsK9001-1/+4
(cherry picked from commit bde7471aa2d06b1562352677b12b493d0dd7a26c)
2024-02-09nixos/lib/make-squashfs.nix: allow disabling compressionCole Mickens1-1/+2
(cherry picked from commit 5a718794d0f559963fd5a21e18896a66c5232645)
2023-12-28nixos/lib/make-disk-image: Create build products metadataMartin Weinelt1-2/+7
For hydra to expose built images for direct download, listing the relevant files in nix-support/hydra-build-products is required. (cherry picked from commit 0392a075113e55b636018f45d9c9e5e8981e5156)
2023-11-18nixos/networkd: add [IPVLAN] and [IPVTAP] configuration options to ↵Philip Taron1-0/+6
systemd.netdev files [IPVLAN](https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html#%5BIPVLAN%5D%20Section%20Options) [IPVTAP](https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html#%5BIPVTAP%5D%20Section%20Options)
2023-11-10Merge pull request #256226 from ElvishJerricco/systemd-stage-1-testing-backdoorRyan Lahfa1-0/+16
2023-11-09systemd-stage-1: Enable backdoor in nixos testsWill Fancher1-0/+16
2023-11-09Merge pull request #266369 from SuperSandro2000/systemd-unit-empty-linesWill Fancher1-18/+17
systemd-lib: cleanup empty lines in unit files
2023-11-09systemd-lib: cleanup empty lines in unit filesSandro Jäckel1-18/+17
2023-11-08Merge pull request #265836 from hercules-ci/nixosTests-no-surprisesRobert Hensing1-3/+0
nixos/testing/nodes: Do allow aliases
2023-11-07nixos/lib/make-btrfs-fs: Use fakeroot and faketime (#265686)Samuel Cormier-Iijima1-2/+4
2023-11-06nixos/testing/nodes: Do allow aliasesRobert Hensing1-3/+0
Aliases exist for a reason. Sure it is nice to make sure that some aliases aren't used within Nixpkgs, but this creates two problems which are far worse than your failing to meet your neatness compulsions. - Users encounter missing attributes, https://github.com/NixOS/nixpkgs/issues/264577 wasting their time, stalling their progress, and even occupying others time that would be better spent on fixing *real* issues. - Hydra doesn't treat evaluation errors seriously enough, with the effect that actual relevant test failures are masked by evaluation failures such as those caused by this no aliases business. - We don't even have the infrastructure to get rid of aliases, because all warnings in package attributes are disallowed by Nixpkgs CI tooling, last I checked. Before re-disabling this, make sure that - An actually helpful deprecation process is in place. - Aliases are still allowed when `nixos-lib.runTests` and `pkgs.testers.runNixOSTest` are invoked by external projects. For instance, `all-tests.nix` could provide such an override (e.g. with `newScope`).
2023-11-02nixos/systemd-lib: fix building of empty unit filesemilylange1-1/+4
This is a fixup for c1ae82f448b10b278dc77e02518775175b463a27. nix' `passAsFile` does not create empty files for variables that are `null`. This results in the following error for units that have no overrides or content, but are, e.g. `wantedBy`: `mv: cannot stat '': No such file or directory`. Minimal reproducer: `systemd.units.empty.wantedBy = [ "multi-user.target" ];` This is often necessary when a unit is loaded in via `systemd.packages`.
2023-10-31nixos/systemd: fix make unit failed when unit too large5aaee91-1/+2
2023-10-29Merge pull request #262839 from RaitoBezarius/qemu-vm/timeoutRyan Lahfa6-13/+76
2023-10-29nixos/lib/test-driver: add driver-timeout as a passthru testRaito Bezarius1-0/+5
From now on, we will aim to ensure that the test driver gets tested by OfBorg using all our available tests. This commit adds the driver timeout test to the driver.
2023-10-29nixos/lib/testing/run: expose `rawTestDerivation`Raito Bezarius1-13/+23
For `testBuildFailure` and similar functions, we need a full blown derivation and not a lazy one. This is an internal option for test framework developers.
2023-10-29nixos/test-driver: provide a global timeoutRaito Bezarius4-0/+48
Since the debut of the test-driver, we didn't obtain a race timer with the test execution to ensure that tests doesn't run beyond a certain amount of time. This is particularly important when you are running into hanging tests which cannot be detected by current facilities (requires more pvpanic wiring up, QMP API stuff, etc.). Two easy examples: - Some QEMU tests may get stuck in some situation and run for more than 24 hours → we default to 1 hour max. - Some QEMU tests may panic in the wrong place, e.g. UEFI firmware or worse → end users can set a "reasonable" amount of time And then, we should let the retry logic retest them until they succeed and adjust their global timeouts. Of course, this does not help with the fact that the timeout may need to be a function of the actual busyness of the machine running the tests. This is only one step towards increased reliability.
2023-10-24Merge pull request #262021 from Enzime/linux-builder-crossRobert Hensing1-0/+1
linux-builder: support `x86_64-linux` on `aarch64`
2023-10-24linux-builder: support `x86_64-linux` on `aarch64`Michael Hoang1-0/+1
2023-10-24Merge pull request #260595 from adamcstephens/lxc/squashfsMaciej Krüger1-3/+10
lxc-container: add squashfs image support and release output
2023-10-22Merge pull request #257535 from RaitoBezarius/vmstateJacek Galowicz2-1/+112
nixos/lib/test-driver: use QMP API to watch for VM state
2023-10-21Merge pull request #257262 from dongcarl/2023-09-nginx-fixesRyan Lahfa1-0/+22
nixos/nginx: Allow empty port for listen directive (for unix socket)
2023-10-21nixos/lib/test-driver: wire up QMP clientRaito Bezarius2-1/+112
Now that we have a QMP client, we can wire it up in the test driver. For now, it is almost completely useless because of the need of a constant "event loop", especially for event listening. In the next commits, we will slowly enable more and more usecases.
2023-10-16systemd.network.netdev: Add support for WLAN devicesPhilip Taron1-0/+3
These are virtual interface, where one physical wifi adapter can have more than one interface. See https://systemd.network/systemd.netdev.html#%5BWLAN%5D%20Section%20Options and https://github.com/systemd/systemd/commit/dedf2d0054eb3150697b1540bf9733cba9e881fd
2023-10-12make-squashfs: add support for pseudoFiles, custom name, and disabling stripAdam Stephens1-3/+10
2023-10-10nixos/eval-config.nix: Rename arg nixosSystem -> configurationRobert Hensing1-3/+3
For some time now the attrset returned by `evalModules` has `type = "configuration"`. This is a clean refactor because the name is not exposed. (never is for simple lambda)
2023-10-10nixos/eval-config.nix: Rename let withExtraArgs -> withExtraAttrsRobert Hensing1-3/+3
Presumably it only used to add `extraArgs`, but it also adds other attributes now.
2023-10-09nixos/nginx: Allow empty port for listen directiveCarl Dong1-0/+22
When listening on unix sockets, it doesn't make sense to specify a port for nginx's listen directive. Since nginx defaults to port 80 when the port isn't specified (but the address is), we can change the default for the option to null as well without changing any behaviour.
2023-10-08eval-config.nix: set nixpkgs.pkgs instead of _module.args.pkgsK9001-5/+3
This allows nixpkgs.overlays to work, and also the nixpkgs.config check.
2023-10-06nixos/testing: fix eval for tests created without make-python-test.nixK9001-7/+9
We have too many test entrypoints and this is a problem.
2023-10-06nixosTest: fix tests defined with pkgs.nixosTestK9001-2/+2
2023-10-04Merge pull request #257510 from ign0tus/fix/wake-on-lan-policyFlorian Klink1-0/+4
Fix: WakeOnLan policy
2023-09-30Fix broken genJqSecretsReplacementSnippet for jq 1.7 (#257932)Reno Reckling1-4/+7
jq 1.7 updated it's behaviour and now throws an error if the first argument is an empty string. It now needs "." to pass the input through.
2023-09-30nixos/test-driver: whitelist variable names that don't follow pep8Jörg Thalheim1-4/+4
https://docs.astral.sh/ruff/rules/invalid-argument-name/
2023-09-30nixos/test-driver: name exception according to pep8Jörg Thalheim1-2/+2
see https://docs.astral.sh/ruff/rules/error-suffix-on-exception-name/
2023-09-30nixos/test-driver: apply ruff fixes & suggestionsJörg Thalheim7-29/+29
2023-09-30nixos/test-driver: disable typecheck for dependencies where don't have typingJörg Thalheim2-0/+12
2023-09-30nixos/test-driver: add shell.nixJörg Thalheim1-0/+2
this useful for local development
2023-09-30nixos/test-driver: fix type errors in extract-docstringsJörg Thalheim1-17/+25
2023-09-30nixos/test-driver: convert to pyproject from setup.pyJörg Thalheim3-24/+45
This also makes configuration available if you just run those tools locally. Also use ruff instead of pylint because it's faster and more comprehensive.
2023-09-29nixos/lib/test-driver: reduce spam at boot hangsRaito Bezarius1-0/+3
Since 008f9f0cd419bd66e922239e2319fd2b1f347ad8 ("nixos/test-driver: actually use the backdoor message to wait for backdoor"), when boot is still computering, we can get a tons of empty strings in response to the shell. This is not really useful to print and waste the disk space for any CI system that logs them. We stop logging chunks whenever they are empty.
2023-09-28networkd: Allow combinations of WakeOnLan policiesign0tus1-0/+4
To comply with the systemd.link WakeOnLan[^1] specification, the option "off" and all other possible policy combinations must be allowed. [^1]: https://www.freedesktop.org/software/systemd/man/systemd.link.html#WakeOnLan=
2023-09-22test-driver: revert stderr nullpipeMaciej Krüger1-1/+3
Removes 2>/dev/null which re-adds stderr output breaking execute
2023-09-21Merge pull request #192593 from jlesquembre/test-driverArtturi1-14/+18
2023-09-20nixos/tests: make wait_for timeouts configurableJosé Luis Lafuente1-14/+18
While working on #192270, I noticed that only some wait_for_* helper functions make the timeout configurable. I think we should be able to customize it in all cases
2023-09-20Merge pull request #253876 from nbraud/nixos/sudo-rsMaciej Krüger1-3/+1
2023-09-19Merge pull request #255008 from SuperSandro2000/x-triggers-nameWill Fancher1-3/+3
systemd-lib: add name to X-{Reloads,Restart}-Triggers to easily ident…
2023-09-18nixos/test-driver: do not break if the command writes to stderrMaciej Krüger1-3/+1
Capturing `stderr` as part of the return `output` could break existing tests.
2023-09-15nixos/lib/make-btrfs-fs: copy improvements fromArtturin1-10/+30
https://git.sr.ht/~c00w/nixpkgs/tree/sdimagebtrfs/item/nixos/lib/make-btrfs-fs.nix I made only one change which was to use `btrfs check` instead of `fsck.btrfs` because of this warning ``` btrfs-fs.img> ++ fsck.btrfs /nix/store/6d46rc768c140asy6rjpc5rk568r36zq-btrfs-fs.img btrfs-fs.img> If you wish to check the consistency of a BTRFS filesystem or btrfs-fs.img> repair a damaged filesystem, see btrfs(8) subcommand 'check'. ``` Co-authored-by: Colin L Rice <colin@daedrum.net>
2023-09-15Merge pull request #91956 from c00w/makebtrfsArtturi1-0/+45