about summary refs log tree commit diff
path: root/nixos/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-04-29nixos/lib/qemu-common: add riscv{32,64}-linux to qemu guest matrixstove1-0/+2
2024-04-23Merge pull request #297726 from r-vdp/systemd-unit-namesFlorian Klink4-35/+88
systemd: add a name option to all systemd units
2024-04-21Merge pull request #298983 from illustris/mysqlRyan Hendrickson1-2/+13
nixos/systemd-lib: fix restart/reloadTriggers when passing paths
2024-04-21nixos/systemd-lib: fix restart/reloadTriggers when passing pathsillustris1-2/+13
When passing a path to restartTriggers or reloadTriggers, X-Restart/Reload-Triggers will get populated by the absolute path of the file on the machine where the config is evaluated. This patch corrects this behavior.
2024-04-15systemd: add a name option to all systemd unitsr-vdp4-35/+88
This allows us to set things like dependencies in a way that we can catch typos at eval time. So instead of ```nix systemd.services.foo.wants = [ "bar.service" ]; ``` we can write ```nix systemd.services.foo.wants = [ config.systemd.services.bar.name ]; ``` which will throw an error if no such service has been defined. Not all cases can be done like this (eg template services), but in a lot of cases this will allow to avoid typos. There is a matching option on the unit option (`systemd.units."foo.service".name`) as well.
2024-04-14nixos/networkd: add [Bridge] section to netdev confAstrid Yu2-0/+7
This setting was missing from netdev. This commit additionally adds a test using the new section, ensuring that STP can be enabled.
2024-04-12NixOS Integration tests: Re-enable for macOSJacek Galowicz1-1/+1
2024-04-10Revert "NixOS Integration Tests: Enable again for darwin"Cole Helbling1-1/+1
2024-04-10NixOS Integration Tests: Enable again for darwinJacek Galowicz1-1/+1
2024-04-08Merge pull request #302590 from nikstur/repart-image-label-lengthnikstur1-0/+5
nixos/image/repart: assert maximum label length
2024-04-08systemd-lib: include GPTMaxLabelLength constantnikstur1-0/+5
2024-04-05Merge pull request #301799 from alyssais/QEMU_OPTSJacek Galowicz1-2/+0
nixos/test-driver: don't add QEMU_OPTS twice
2024-04-05nixos/test-driver: don't add QEMU_OPTS twiceAlyssa Ross1-2/+0
As the TODO says, this is already included by the script. If adding a device, including this again here would result in either two devices being added, or, if they were explicitly named, an error due to reuse of the name.
2024-04-03nixos/tests/installer: avoid create_machine, clean upK9001-0/+7
- use normal VM nodes for target, with some extra trickery - rename preBootCommands to postBootCommands to match its actual intent - rename VMs to installer and target, so they're not all called machine - set platforms on non-UEFI tests properly - add missing packages for systemd-boot test - fix initrd secrets leaking into the store and having wrong paths
2024-04-01nixos/lib, doc: remove references to mdDoc (#300738)Philip Taron11-100/+94
* doc: remove references to mdDoc in nixos/doc/manual/development/option-declarations.section.md * nixos/lib: remove mdDoc in nixos/lib/make-options-doc/default.nix * nixos/lib: remove mdDoc in nixos/lib/systemd-types.nix * nixos/lib: remove mdDoc in nixos/lib/systemd-unit-options.nix * nixos/lib: remove mdDoc in nixos/lib/testing/driver.nix * nixos/lib: remove mdDoc in nixos/lib/testing/interactive.nix * nixos/lib: remove mdDoc in nixos/lib/testing/meta.nix * nixos/lib: remove mdDoc in nixos/lib/testing/name.nix * nixos/lib: remove mdDoc in nixos/lib/testing/network.nix * nixos/lib: remove mdDoc in nixos/lib/testing/nodes.nix * nixos/lib: remove mdDoc in nixos/lib/testing/run.nix * nixos/lib: remove mdDoc in nixos/lib/testing/testScript.nix
2024-04-01Merge pull request #299652 from philiptaron/issue-208242/nixos/lib/systemdFlorian Klink5-114/+261
Avoid top-level `with ...;` in `nixos/lib/systemd*`
2024-03-28Merge pull request #296384 from pennae/remove-docbook-docs-supportSilvan Mosberger1-15/+1
nixos/docs: remove docbook support machinery
2024-03-28nixos/doc: remove optionsDocBookpennae1-15/+1
these were deprecated in 23.11 and slated for removal in 24.05. 24.05 is soon enough, so we should probably make good on this promise.
2024-03-27Avoid top-level `with ...;` in nixos/lib/utils.nixPhilip Taron1-13/+48
2024-03-27Avoid top-level `with ...;` in nixos/lib/systemd-unit-options.nixPhilip Taron1-57/+81
2024-03-27Avoid top-level `with ...;` in nixos/lib/systemd-types.nixPhilip Taron1-32/+76
2024-03-27Avoid top-level `with ...;` in nixos/lib/systemd-network-units.nixPhilip Taron1-2/+7
2024-03-27Avoid top-level `with ...;` in nixos/lib/systemd-lib.nixPhilip Taron1-10/+49
2024-03-26nixos/tests: Remove unnecesary wait from initrdBackdoorWill Fancher1-1/+0
2024-03-23nixos/lib: Support derivations in escapeSystemdExecArgMartin Weinelt1-2/+2
They can be transformed into their outpath string, which is useful for config generators.
2024-03-21doc: write improved documentation for nixosOptionsDoc (#295279)Johannes Kirschbauer1-12/+87
* doc: write improved documentation for nixosOptionsDoc * Apply suggestions from @infinisil Co-authored-by: Silvan Mosberger <github@infinisil.com> * doc: minor fixup --------- Co-authored-by: Silvan Mosberger <github@infinisil.com>
2024-03-17Merge pull request #293710 from B4dM4n/networkd-policy-rule-port-rangeWill Fancher1-1/+14
nixos/networkd: allow RoutingPolicyRule port ranges
2024-03-12nixos/iso-image: extremely cursed performance optimization for HydraK9002-2/+28
Right now the worst case chain of events for building an ISO on Hydra is - copy everything to squashfs builder - run squashfs builder - download squashfs from builder - compress squashfs - upload squashfs to S3 - copy squashfs to ISO builder - run ISO builder - download ISO from builder - compress ISO - upload ISO to S3 This inlines the squashfs build into the ISO build, which makes it - copy everything to ISO builder - run ISO builder - download ISO from builder - compress ISO - upload ISO to S3 Which should reduce queue runner load by $alot per ISO, which we have four of on small channels (one release, one test per arch) and a lot more than four of on large channels (with various desktops)
2024-03-08nixos/lib/test-driver: fix mypy errors after staging-next mergeK9001-7/+5
2024-03-06nixos/networkd: allow RoutingPolicyRule port rangesFabian Möller1-1/+14
Linux and Systemd allow port ranges to be used in routing policy rules. https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#SourcePort=
2024-03-02macOS support for NixOS tests (#282401)Gabriella Gonzalez3-3/+29
Closes #193336 Closes #261694 Related to #108984 The goal here was to get the following flake to build and run on `aarch64-darwin`: ```nix { inputs.nixpkgs.url = <this branch>; outputs = { nixpkgs, ... }: { checks.aarch64-darwin.default = nixpkgs.legacyPackages.aarch64-darwin.nixosTest { name = "test"; nodes.machine = { }; testScript = ""; }; }; } ``` … and after this change it does. There's no longer a need for the user to set `nodes.*.nixpkgs.pkgs` or `nodes.*.virtualisation.host.pkgs` as the correct values are inferred from the host system.
2024-03-01nixos/lib/make-disk-image.nix: fix systemd-boot-builder clobbering ↵Arian van Putten1-0/+7
/homeless-shelter systemd-boot-builder.py calls nix-env --list-generations which creates $HOME/.nix-defexpr/channels/nixos if it doesn't exist. This would cause a folder /homeless-shelter to show up in the final image which in turn breaks nix builds in the target image if sandboxing is turned off (as /homeless-shelter is never allowed to exist).
2024-03-01nixos/lib/test-driver: make the warning message more noticeableK9001-1/+6
2024-02-29Merge pull request #292189 from nagisa/fixes-systemd-upheldBy-propagationFranz Pletz1-8/+8
2024-02-29systemd: fix propagation of upheldBy option to unitsSimonas Kazlauskas1-8/+8
2024-02-28Merge pull request #291544 from K900/ovmf-oofK9003-105/+58
nixos/tests: drop LegacyStartCommand
2024-02-28nixos/lib/test-driver: provide legacy path for ↵K9002-2/+38
create_machine({"startCommand": "..."})
2024-02-27Merge pull request #290946 from ju1m/systemd-option-listWill Fancher1-8/+2
nixos/systemd: merge unit options as lists when at least one value is a list
2024-02-27Merge pull request #285401 from sdht0/systemd-boot-xbootldrWill Fancher1-16/+39
nixos/systemd-boot: Add support for an XBOOTLDR partition
2024-02-27nixos/lib/testing: remove yet another source of unnecessary test rebuildsK9001-0/+1
2024-02-27nixos/lib/test-driver: drop LegacyStartCommand, clean up create_machine APIK9003-104/+22
We can finally do this now that it's no longer used.
2024-02-27lib/test-driver: don't swallow qemu stderrK9001-1/+0
2024-02-27nixos/lib/testing: remove another source of unnecessary test rebuildsK9001-1/+4
2024-02-26nixos/lib/make-disk-image: Add ability to setup an XBOOTLDR partitionSiddhartha1-16/+39
2024-02-25Merge pull request #284874 from shlevy/ovmf-msAdam C. Stephens1-0/+3
Enable MS-compatible secure boot with OVMF
2024-02-25nixos/systemd: merge unit options as lists when at least one value is a listJulien Moutinho1-8/+2
2024-02-23nixos/testDriver: remove pinned mypy python versionMichael Schneider1-1/+0
2024-02-15OVMF: Add test with secure boot enabledShea Levy1-0/+3
Co-authored-by: Arthur Gautier <arthur.gautier@arista.com>
2024-02-14nixos/systemd: Support notify-reload service TypeSilvan Mosberger1-1/+1
Support for this was added in systemd 253: https://github.com/systemd/systemd/releases/tag/v253
2024-02-10reviewSimonas Kazlauskas1-7/+1