about summary refs log tree commit diff
path: root/nixos/modules/misc
AgeCommit message (Collapse)AuthorFilesLines
2023-01-05Merge pull request #209064 from Lassulus/os-release-extraLassulus1-0/+9
2023-01-05modules: add mkPackageOptionMDpennae1-1/+1
another transitional option factory, like mkAliasOptionModuleMD.
2023-01-04nixos/misc: add VARIANT_ID in /etc/os-release for identifying nixos installerlassulus1-0/+9
This is a feature useful for nixos-remote and other installation tools that try to identify if the remote machine has been successfully booted into an installer.
2022-12-28nixos/version: Only warn about unset stateVersion if usedRobert Hensing1-8/+6
If a configuration does not use services that depend on the stateVersion, it does not need to be set. This provides an incentive for services not to rely on stateVersion, and not to burden users with this.
2022-12-26Revert "treewide: use nativeBuildInputs with runCommand instead of inlining"K9001-2/+1
2022-12-25Merge pull request #206775 from SuperSandro2000/runCommand-nativeBuildInputsSandro1-1/+2
2022-12-19Merge pull request #206709 from SuperSandro2000/mandb-miscArtturi1-6/+4
nixos/man-db: use nativeBuildInputs
2022-12-18treewide: use nativeBuildInputs with runCommand instead of inliningSandro Jäckel1-1/+2
2022-12-18nixos/man-db: use nativeBuildInputsSandro Jäckel1-6/+4
2022-12-17nixos: fix typosfigsoda1-1/+1
2022-12-08nixos/doc: render option values using `lib.generators.toPretty`Naïm Favier1-3/+8
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-01Merge pull request #203826 from figsoda/lintfigsoda1-7/+2
nixos/*: apply some lints from statix and nil
2022-11-30nixos/nixpkgs: remove unused bindingfigsoda1-7/+2
2022-11-22nixos/mandb: fix cross compilingJörg Thalheim1-1/+5
2022-11-16automatic-timezoned: init at 1.0.41Maxime Brunet1-0/+2
2022-11-16nixos/misc: fix grammar typoBrian Cooper1-1/+1
2022-11-12nixos/man-db: allow man-cache to be fetched from cacheBernardo Meurer1-1/+1
Currently, we build `man-cache` with `runCommandLocal`, which causes it to get re-built locally instead of fetched from cache. While the resulting derivation might be small, it does take a fair bit of time to build for all my systems, and would be _far_ quicker to fetch. With this change, we use `runCommand` instead of `runCommandLocal`, allowing it to get fetched from cache instead of rebuilt for all hosts.
2022-10-28nixos/modules/misc/documentation.nix: Don't use toString on a pathEelco Dolstra1-3/+5
It gives a warning on the lazy-trees branch of Nix (https://github.com/NixOS/nix/pull/6530) and should generally be avoided because it causes an unnecessary copy to the store.
2022-10-27nixos/nixpkgs.nix: Fix assertion when nixpkgs.pkgs is setRobert Hensing1-1/+1
2022-10-20nixos/nixpkgs: Only error when nixpkgs options are actually usedRobert Hensing2-1/+12
2022-09-11nixos: Fix cross compilation of derivations defined in NixOS via pkgsChristian Kögler1-1/+1
2022-09-10lib/options: deprecate docbook text and literalDocBookpennae1-1/+18
deprecate literalDocBook by adding a warning (that will not fire yet) to its uses and other docbook literal strings by adding optional warning message to mergeJSON.
2022-08-31nixos/*: convert options with listingspennae2-21/+21
minor rendering changes.
2022-08-31nixos/*: md-convert hidden plaintext optionspennae1-1/+1
most of these are hidden because they're either part of a submodule that doesn't have its type rendered (eg because the submodule type is used in an either type) or because they are explicitly hidden. some of them are merely hidden from nix-doc-munge by how their option is put together.
2022-08-31nixos/*: convert internal option descriptions to MDpennae4-8/+8
we'll have to do it eventually, may as well be now.
2022-08-31nixos/*: automatically convert option descriptionspennae4-4/+4
conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
2022-08-31nixos/*: md-convert options with unordered listspennae1-8/+7
mostly no rendering changes. some lists (like simplelist) don't have an exact translation to markdown, so we use a comma-separated list of literals instead.
2022-08-31nixos/*: <screen> -> <programlisting>pennae1-4/+5
most of the screen tags used in option docs are actually listings of some sort. nsd had a notable exception where its screen usage was pretty much a raw markdown block that made most sense to convert into docbook lists.
2022-08-27nixos/*: literalDocBook -> literalMDpennae1-2/+2
no change to rendered output
2022-08-19nixos/*: automatically convert option docspennae2-11/+11
2022-08-19nixos/*: mark pre-existing markdown descriptions as mdDocpennae1-1/+1
2022-08-12nixos/localtimed: fix serviceBernardo Meurer1-0/+2
2022-08-12Merge pull request #185474 from pennae/option-docs-mdpennae3-46/+44
nixos/*: more options md conversion
2022-08-08Merge pull request #181222 from hercules-ci/module-specialArgsRobert Hensing4-15/+73
`_module.specialArgs` + unit test for nixos/documentation module
2022-08-06nixos/*: automatically convert option docspennae3-43/+43
2022-08-05nixos/*: normalize manpage references to single-line formpennae2-4/+2
now nix-doc-munge will not introduce whitespace changes when it replaces manpage references with the MD equivalent. no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-03nixos/*: replace <code> in option docs with <literal>pennae1-22/+22
markdown can't represent the difference without another extension and both the html manual and the manpage render them the same, so keeping the distinction is not very useful on its own. with the distinction removed we can automatically convert many options that use <code> tags to markdown. the manpage remains unchanged, html manual does not render differently (but class names on code tags do change from "code" to "literal").
2022-08-02Merge pull request #183491 from pennae/automatic-md-conversionspennae3-16/+16
treewide: automatically md-convert option descriptions
2022-08-01Merge pull request #177012 from hercules-ci/nixos-modular-systemSilvan Mosberger1-0/+34
`flake.lib.nixosSystem`: Allow `nixpkgs.system` to be set modularly; improve error message
2022-07-30treewide: automatically md-convert option descriptionspennae3-16/+16
the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
2022-07-24nixos/misc: invariant option docs MD conversionspennae3-14/+14
2022-07-21nixos/documentation: Add unit testRobert Hensing2-0/+49
2022-07-21nixos/documentation: Remove systemd/initrd dependencyRobert Hensing1-5/+6
Working towards a unit-testable documentation module.
2022-07-21nixos: Declare module dependenciesRobert Hensing2-0/+7
Working towards a unit-testable documentation module.
2022-07-21nixos: Move getty helpLine definition to getty moduleRobert Hensing1-4/+0
Working towards a unit-testable documentation module.
2022-07-21nixos/documentation: Make extraModules configurableRobert Hensing1-4/+9
2022-07-21nixos/documentation: Forward the specialArgsRobert Hensing1-2/+2
This is necessary when generating the complete documenation for configurations that import modules from the module arguments.
2022-07-17Merge pull request #172058 from midchildan/improvement/1pw-gidSandro1-0/+21
nixos/_1password{,-gui}: use a static gid
2022-07-15nixos/label: add validation for system.nixos.label (#181479)Lucas Eduardo1-1/+4
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-07-10nixos/nixpkgs.nix: Recommend hostPlatform instead of systemRobert Hensing1-0/+34
The ${opt.*} syntax will print the full path when NixOS is used as a submodule. nixpkgs.system / nixpkgs.localSystem must not be read by any other module because its meaning is ambiguous in cross vs non-cross contexts. hostPlatform is generally what you need. *Where* you build something generally doesn't matter in a system _configuration_ context like NixOS.