about summary refs log tree commit diff
path: root/nixos/lib
AgeCommit message (Collapse)AuthorFilesLines
2022-12-22nixos/systemd: document what `scriptArgs` is forNaïm Favier1-1/+5
2022-12-17nixos: fix typosfigsoda1-1/+1
2022-12-15lib.replaceChars: warn about being a deprecated aliasArtturin2-6/+6
replaceStrings has been in nix since 2015(nix 1.10) so it is safe to remove the fallback https://github.com/nixos/nix/commit/d6d5885c1567454754a0d260521bafa0bd5e7fdb
2022-12-08nixos/make-options-doc: remove dead codeNaïm Favier1-82/+0
The logic for pretty-printing Nix values isn't needed any more because `optionAttrSetToDocList` returns already rendered values.
2022-12-08nixos/doc: render option values using `lib.generators.toPretty`Naïm Favier1-18/+1
Render un`_type`d defaults and examples as `literalExpression`s using `lib.generators.toPretty` so that consumers don't have to reinvent Nix pretty-printing. `renderOptionValue` is kept internal for now intentionally. Make `toPretty` print floats as valid Nix values (without a tilde). Get rid of the now-obsolete `substSpecial` function. Move towards disallowing evaluation of packages in the manual by raising a warning on `pkgs.foo.{outPath,drvPath}`; later, this should throw an error. Instead, module authors should use `literalExpression` and `mkPackageOption`.
2022-12-07nixos/make-options-doc: improve CommonMark formattingsandydoo1-2/+4
Render the `type` attribute in a code block to match the rest of the attributes.
2022-12-07nixos/make-options-doc: pretty-print literalssandydoo4-68/+112
Unlike the XML doc renderer, the AsciiDoc and CommonMark renderers don't pretty-print certain complex types, like literal expressions, DocBook literals, and derivations. These types are dumped into the documentation as JSON. This commit parses and unwraps these types when loading the JSON-formatted NixOS options. The AsciiDoc and CommonMark renders have also been combined into a single script to allow code reuse.
2022-12-03Revert "nixos/lib: add /home to pathsNeededForBoot"Artturi1-1/+1
2022-12-01nixos/lib: add /home to pathsNeededForBootLin Jian1-1/+1
Before this patch, if we: 1. add a new user in the config, 2. mount /home seperately, 3. not set neededForBoot for /home, 4. and run `nixos-rebuild boot`, the newly added user's home will not be created after a reboot. This is because when nixos/modules/config/update-users-groups.pl is running in stage 2 to setup users, /home is not mounted. This patch fixes this issue.
2022-11-19test-driver: Allow configuring delay for send_{key,chars}Zhaofeng Li1-4/+5
2022-11-14Merge pull request #200646 from hercules-ci/options-markdown-and-errorsRobert Hensing2-8/+22
`nixosOptionsDoc`: add `markdownByDefault`, error handling
2022-11-11nixos/lib/testing-python: remove unused `with pkgs;`Andreas Rammhold1-3/+0
This with statement has no users anymore and can safely be removed.
2022-11-11nixosOptionsDoc: Report in which option an error occursRobert Hensing1-11/+15
2022-11-11nixosOptionsDoc: Add markdownByDefault parameterRobert Hensing2-0/+10
2022-11-05nixos options markdown: fix html escapingDomen Kožar1-1/+1
\<foo\> will often be displayed like \<foo>, for example by mkdocs. I've tested a number of markdown renderers and they render html escape sequences fine.
2022-11-02nixos/systemd-unit-options: document correct wantedBy default for user units ↵Jörg Thalheim1-14/+14
(#199007) Until this commit, the documentation suggested `multi-user.target` as `wantedBy` for all services. Since `multi-user.target` is not available for user services, propose a different default for those in the documentation. Co-authored-by: Naïm Favier <n@monade.li> Co-authored-by: Florian Warzecha <liketechnik@disroot.org>
2022-10-28Merge pull request #186314 from ck3d/unit-add-map-controlFlorian Klink2-11/+40
nixos: Add option to influence override strategies in systemd units
2022-10-27nixos: Add unit option overrideStrategyChristian Kögler2-11/+40
2022-10-25nixos/make-options-doc: fix JSON generation on DarwinWinter1-1/+5
2022-10-23nixos/unitGenerator: fix generation for nspawn filesChristian Kögler1-3/+3
2022-10-21Merge master into staging-nextgithub-actions[bot]1-5/+13
2022-10-20nixos/lib.escapeSystemdPath: Implement the correct algorithm for escaping ↵Daniel Olsen1-5/+13
names in systemd units Co-authored-by: ajs124 <git@ajs124.de>
2022-10-19Merge branch 'master' into staging-nextJan Tojnar3-5/+11
; Conflicts: ; pkgs/development/tools/codespell/default.nix codespell 2.2.2 switched to pyproject & setuptools_scm: https://github.com/codespell-project/codespell/pull/2523
2022-10-18Merge pull request #196281 from hercules-ci/restore-nixos-test-dxRobert Hensing2-3/+9
nixos: Restore test DX
2022-10-18Merge pull request #194035 from Ma27/show-option-quotingRobert Hensing1-2/+2
lib/options/showOption: fix quoting of attr-names that are not identifiers
2022-10-16nixos/lib/testing: Delay nodes.machine.~config~ migrationRobert Hensing1-1/+1
Provide a window during which both solutions are valid without warnings, in order to fight warning fatigue, and not to push 3rd party repo maintainers to add unnecessary compat code.
2022-10-16nixos/tests: Generalize nix-build file.nix hack to testing-python.nixRobert Hensing1-2/+8
2022-10-09Merge staging-next into staginggithub-actions[bot]1-5/+9
2022-10-09nixos/doc: fix buildMaximilian Bosch1-2/+2
Now we even have options like `services.listmonk.database.settings."app.notify_emails"` shown correctly (i.e. with quotes).
2022-10-09genJqSecretsReplacementSnippet: Allow dots in attribute names...talyz1-5/+9
...and escape quotation marks and backslashes.
2022-10-07nixosOptionsDoc: buildInputs -> nativeBuildInputsArtturin1-1/+1
to make strictDepsByDefault work
2022-10-04Merge pull request #193498 from hercules-ci/nixos-doc-disambiguate-test-optionsRobert Hensing6-11/+15
nixos/doc: disambiguate test option ids
2022-10-04nixos/lib/qemu-common.nix: set qemuSerialDevice for isMips64Adam Joseph1-1/+1
2022-10-01Merge pull request #193132 from figsoda/clean-upfigsoda2-16/+0
treewide: clean up
2022-09-29nixos/doc: Disambiguate test option idsRobert Hensing4-10/+10
Changing this later on would break external links into the manual.
2022-09-29make-options-doc: Make optionIdPrefix configurable ("opt-")Robert Hensing2-1/+5
2022-09-29nixos/testing: Fix release.nix tests evaluationRobert Hensing3-8/+4
Fixes the problem introduced by 12b3066aae46a8ccc3d21f54f668a3f4be344332 which caused nixos/release.nix to return the wrong attributes, while intending to only affect nixos/lib's runTest. This also removes callTest from the test options, because callTest is only ever invoked by all-tests.nix.
2022-09-29Merge pull request #187817 from intelfx/nixos-containertarballs-fix-pixzFranz Pletz1-1/+1
make-system-tarball: use `pixz -t`
2022-09-28lib.nixos.runTest: Return the test itselfRobert Hensing1-1/+1
(NB: the lib in the flake) Correcting a mistake I made when removing the test matrix code from https://github.com/NixOS/nixpkgs/pull/191540
2022-09-28Merge pull request #191540 from hercules-ci/nixosTest-modularRobert Hensing17-342/+789
nixosTest: make modular
2022-09-26nixos/lib/make-single-disk-zfs-image.nix: remove unused bindingfigsoda1-9/+0
2022-09-26nixos/lib/make-multi-disk-zfs-image.nix: remove unused bindingfigsoda1-7/+0
2022-09-24nixos/testing/network.nix: Add network config to specialisationsRobert Hensing2-1/+2
2022-09-24nixos/testing: Improve interactive docsRobert Hensing1-1/+21
2022-09-24nixos/testing: Add nodes.config backcompat to nodes module argumentRobert Hensing1-1/+1
2022-09-24nixos/testing: Improve option docsRobert Hensing8-26/+109
2022-09-24nixos/testing-python: Add interactive variant support to makeTestRobert Hensing1-0/+1
2022-09-24nixos/testing: Support mypy through regular mechanismsRobert Hensing1-3/+1
Rebase / forward port of 2c8bbf33fd84d2fd9de70d66c1f50ac1b6123dd8
2022-09-24nixos/testing/meta.nix: Add options, some optionalRobert Hensing1-3/+19
2022-09-24nixos/testing/network.nix: Fix specialisations onlyShorthandRobert Hensing1-5/+9