about summary refs log tree commit diff
path: root/nixos/modules/misc
AgeCommit message (Collapse)AuthorFilesLines
2023-02-25Revert "nixos/polkit: guard static gid for polkituser behind state version"Winter1-1/+1
This reverts commit 2265160fc0b4cc9a38b392ec3b3a3fe18c2e5413 and e56db577a1f69c02e80d8bc26d514c01a2c5cc61. Ideally, we shouldn't cause friction for users that bump `stateVersion`, and I'd consider having to switch and/or manually hardcode a UID/GID to supress the warning friction. I think it'd be more beneficial to, in this rare case of an ID being missed, just let it be until more discussion happens surrounding this overall issue. See https://github.com/NixOS/nixpkgs/pull/217785 for more context.
2023-02-25Revert "nixos/systemd-coredump: guard static gid for systemd-coredump behind ↵Winter1-1/+0
state version" This reverts commits f5483464d5726d05b6169017e6b0f64ebccc2f53 and 6b9583e5e121b26468d880bdb65302a9172fc041. Ideally, we shouldn't cause friction for users that bump `stateVersion`, and I'd consider having to switch and/or manually hardcode a UID/GID to supress the warning friction. I think it'd be more beneficial to, in this rare case of an ID being missed, just let it be until more discussion happens surrounding this overall issue. See https://github.com/NixOS/nixpkgs/pull/217785 for more context.
2023-02-22nixos/polkit: set static gid for polkituser1sixth1-1/+1
polkituser needs a group since https://github.com/NixOS/nixpkgs/pull/130522.
2023-02-08nixos/systemd-coredump: fix group idIzorkin1-0/+1
2023-02-06treewide: fix backwards smart apostrophesJason Yundt1-1/+1
According to the Unicode Standard, you should use U+2019 RIGHT SINGLE QUOTATION MARK for apostrophes [1]. Before this change, some of the text in this repo would use U+2018 LEFT SINGLE QUOTATION MARKs instead. [1]: https://www.unicode.org/versions/Unicode15.0.0/ch06.pdf#G12411
2023-01-27nixos/manual: render module chapters with nixos-render-docspennae1-1/+1
this converts meta.doc into an md pointer, not an xml pointer. since we no longer need xml for manual chapters we can also remove support for manual chapters from md-to-db.sh since pandoc converts smart quotes to docbook quote elements and our nixos-render-docs does not we lose this distinction in the rendered output. that's probably not that bad, our stylesheet didn't make use of this anyway (and pre-23.05 versions of the chapters didn't use quote elements either). also updates the nixpkgs manual to clarify that option docs support all extensions (although it doesn't support headings at all, so heading anchors don't work by extension).
2023-01-22nixos/documentation: deprecate docbook option docspennae1-0/+8
following the plan in https://github.com/NixOS/nixpkgs/pull/189318#discussion_r961764451 also adds an activation script to print the warning during activation instead of during build, otherwise folks using the new CLI that hides build logs by default might never see the warning.
2023-01-16nixos/documentation.man.mandb: Add skipPackages option, and include ↵Jeff Huffman1-1/+11
nixos-version prevents unnecessary recreation of man caches Fixes #209835
2023-01-14nixos/version: add config.system.nixos.distroName and ↵Victor Fuentes1-9/+23
config.system.nixos.distroId
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