Commit graph

789 commits

Author SHA1 Message Date
Jacek Galowicz 869545857f
Merge pull request #208354 from bjornfor/nixos-test-driver-quote-shell-args
nixos/test-driver: quote some shell command lines
2022-12-30 22:41:04 +01:00
Bjørn Forsman c876f0c146 nixos/test-driver: quote some shell command lines
This makes them robust against paths with whitespace.
2022-12-30 13:19:59 +01:00
Bjørn Forsman 4c45c3f8f2 nixos/test-driver: use ASCII single quotes everywhere
A few places used Unicode U+2018/U+2019 left/right single quotes (but
not always correctly balanced). Let's just use plain ASCII single quotes
everywhere.
2022-12-30 13:00:19 +01:00
Bjørn Forsman ce5644f658 nixos/test-driver: use f-strings instead of .format()
For readability.

Suggested-by: @tfc
2022-12-29 23:51:35 +01:00
Bjørn Forsman dba49a43a0 nixos/test-driver: add optional address arg to wait_for_{open,closed}_port
This is useful for testing servers configured to listen on specific
addresses.
2022-12-29 13:50:17 +01:00
Naïm Favier 3fc528ff7f
Merge pull request #207095 from ncfavier/linux-custom-kernel 2022-12-27 17:10:43 +01:00
K900 2d3cf010fe
Revert "treewide: use nativeBuildInputs with runCommand instead of inlining" 2022-12-26 21:05:35 +03:00
Jörg Thalheim ea415d1a38
Merge pull request #207038 from NixOS/make-disk-image-for-uefi
make-disk-image: documentation, UEFI variables recording, improved determinism
2022-12-26 11:02:28 +00:00
Sandro 5af3f865e8
Merge pull request #206775 from SuperSandro2000/runCommand-nativeBuildInputs 2022-12-25 21:42:05 +01:00
Raito Bezarius 22adcaa449 nixos/lib/make-disk-image: docs, UEFI vars recording, more determinism
- Extensive documentation in NixOS manual
- Deterministic mode that fixes various identifiers relative to disk
  partitions and filesystems in ext4 case
- UEFI variable recording
2022-12-24 19:15:29 +01:00
Robert Hensing 7bfb51f9cd
Merge pull request #207441 from hercules-ci/nixos-testing-python-no-more-specialArgs
nixos/testing-python.nix: Help users who need specialArgs
2022-12-24 17:19:32 +01:00
Jacek Galowicz 9938dec682
Merge pull request #170636 from Synthetica9/wait_before_entry
nixos/test-driver: add wait_before_entry
2022-12-23 19:46:23 +01:00
Robert Hensing d9283c04d5 nixos/testing-python.nix: Help users who need specialArgs 2022-12-23 18:41:52 +01:00
Naïm Favier 84d8b9a809
nixos/systemd: document what scriptArgs is for 2022-12-22 15:17:05 +01:00
Naïm Favier f677cbabe9
nixos/tests: remove minimal-kernel module
It's not used, doesn't build, and seems like the only reason to have
`manualConfig` take `stdenv` as an argument.
2022-12-22 01:42:15 +01:00
Sandro Jäckel 26f704b545
treewide: use nativeBuildInputs with runCommand instead of inlining 2022-12-18 23:36:40 +01:00
figsoda 6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Artturin 05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
Naïm Favier 109f8b4657 nixos/make-options-doc: remove dead code
The logic for pretty-printing Nix values isn't needed any more because
`optionAttrSetToDocList` returns already rendered values.
2022-12-08 17:52:52 +01:00
Naïm Favier 6a117e2759 nixos/doc: render option values using lib.generators.toPretty
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-08 17:52:52 +01:00
sandydoo 3564228a10
nixos/make-options-doc: improve CommonMark formatting
Render the `type` attribute in a code block to match the rest of the
attributes.
2022-12-07 14:39:26 +00:00
sandydoo 926afb6f1c
nixos/make-options-doc: pretty-print literals
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-07 14:06:56 +00:00
Artturi 645b5a2f9f
Revert "nixos/lib: add /home to pathsNeededForBoot" 2022-12-03 15:16:42 +02:00
Lin Jian 0c70035f24
nixos/lib: add /home to pathsNeededForBoot
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-12-01 00:49:46 +08:00
Zhaofeng Li 8b2d34fa5e test-driver: Allow configuring delay for send_{key,chars} 2022-11-19 06:55:25 +01:00
Robert Hensing 833f9d5e1f
Merge pull request #200646 from hercules-ci/options-markdown-and-errors
`nixosOptionsDoc`: add `markdownByDefault`, error handling
2022-11-14 18:58:54 +01:00
Andreas Rammhold 923e404389 nixos/lib/testing-python: remove unused with pkgs;
This with statement has no users anymore and can safely be removed.
2022-11-11 16:05:00 +01:00
Robert Hensing b106ff14ed nixosOptionsDoc: Report in which option an error occurs 2022-11-11 06:47:30 +01:00
Robert Hensing 429ba6c714 nixosOptionsDoc: Add markdownByDefault parameter 2022-11-11 06:29:44 +01:00
Domen Kožar e190302018 nixos options markdown: fix html escaping
\<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-05 21:20:01 +00:00
Jörg Thalheim 951f81c0cc
nixos/systemd-unit-options: document correct wantedBy default for user units (#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-11-02 07:03:22 +00:00
Florian Klink eec71f9dee
Merge pull request #186314 from ck3d/unit-add-map-control
nixos: Add option to influence override strategies in systemd units
2022-10-28 17:56:49 +02:00
Christian Kögler 6d31353099 nixos: Add unit option overrideStrategy 2022-10-27 20:19:18 +02:00
Winter f540aeda6f nixos/make-options-doc: fix JSON generation on Darwin 2022-10-25 22:58:50 -04:00
Christian Kögler c4e0d766b7 nixos/unitGenerator: fix generation for nspawn files 2022-10-23 15:57:55 +02:00
github-actions[bot] c434165354
Merge master into staging-next 2022-10-21 00:05:50 +00:00
Daniel Olsen 3251123a77 nixos/lib.escapeSystemdPath: Implement the correct algorithm for escaping names in systemd units
Co-authored-by: ajs124 <git@ajs124.de>
2022-10-20 20:12:15 +02:00
Jan Tojnar 457f28f6f8 Merge branch 'master' into staging-next
; 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-19 05:24:28 +02:00
Robert Hensing 14a822f72a
Merge pull request #196281 from hercules-ci/restore-nixos-test-dx
nixos: Restore test DX
2022-10-18 11:38:37 +02:00
Robert Hensing 6259b29f29
Merge pull request #194035 from Ma27/show-option-quoting
lib/options/showOption: fix quoting of attr-names that are not identifiers
2022-10-18 11:31:54 +02:00
Robert Hensing 1d9b913088 nixos/lib/testing: Delay nodes.machine.~config~ migration
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-16 16:30:21 +02:00
Robert Hensing 611f247810 nixos/tests: Generalize nix-build file.nix hack to testing-python.nix 2022-10-16 16:30:20 +02:00
github-actions[bot] 3e675d06f5
Merge staging-next into staging 2022-10-09 12:02:02 +00:00
Maximilian Bosch 2480532bd1
nixos/doc: fix build
Now we even have options like
`services.listmonk.database.settings."app.notify_emails"` shown
correctly (i.e. with quotes).
2022-10-09 10:13:21 +02:00
talyz 4df4d2a8ea genJqSecretsReplacementSnippet: Allow dots in attribute names...
...and escape quotation marks and backslashes.
2022-10-09 08:12:19 +02:00
Artturin 09226fffcf nixosOptionsDoc: buildInputs -> nativeBuildInputs
to make strictDepsByDefault work
2022-10-07 19:26:22 +03:00
Robert Hensing 70ec3b9f54
Merge pull request #193498 from hercules-ci/nixos-doc-disambiguate-test-options
nixos/doc: disambiguate test option ids
2022-10-04 21:35:49 +01:00
Adam Joseph c46bdcbaf2 nixos/lib/qemu-common.nix: set qemuSerialDevice for isMips64 2022-10-04 07:48:12 +00:00
figsoda a1d50eecab
Merge pull request #193132 from figsoda/clean-up
treewide: clean up
2022-10-01 17:03:11 -04:00
Robert Hensing 216c5dc10d nixos/doc: Disambiguate test option ids
Changing this later on would break external links into the manual.
2022-09-29 12:41:59 +02:00