Commit Graph

792 Commits

Author SHA1 Message Date
Christian Kögler
f7077ba131
nixos: Fix cross compilation of derivations defined in NixOS via pkgs 2022-09-11 17:11:37 +02:00
pennae
767485a0de lib/options: deprecate docbook text and literalDocBook
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-09-10 18:23:13 +02:00
pennae
f2ea09ecbe nixos/*: convert options with listings
minor rendering changes.
2022-08-31 17:27:36 +02:00
pennae
bd56368848 nixos/*: md-convert hidden plaintext options
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-31 16:32:54 +02:00
pennae
9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
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-31 16:32:53 +02:00
pennae
c915b915b5 nixos/*: md-convert options with unordered lists
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-31 16:32:53 +02:00
pennae
0cfcb5908c nixos/*: <screen> -> <programlisting>
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-31 16:27:24 +02:00
pennae
51a11254a7 nixos/*: literalDocBook -> literalMD
no change to rendered output
2022-08-27 19:18:29 +02:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
Bernardo Meurer
5975411744
nixos/localtimed: fix service 2022-08-12 22:46:16 -04:00
pennae
50f9b3107a
Merge pull request #185474 from pennae/option-docs-md
nixos/*: more options md conversion
2022-08-12 23:23:26 +02:00
Robert Hensing
661c29c806
Merge pull request #181222 from hercules-ci/module-specialArgs
`_module.specialArgs` + unit test for nixos/documentation module
2022-08-08 11:53:10 +02:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae
423545fe48 nixos/*: normalize manpage references to single-line form
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-05 18:34:50 +02:00
pennae
16102dce2f nixos/*: replace <code> in option docs with <literal>
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-03 21:03:23 +02:00
pennae
6b13dd0e9e
Merge pull request #183491 from pennae/automatic-md-conversions
treewide: automatically md-convert option descriptions
2022-08-02 02:15:30 +02:00
Silvan Mosberger
fe2c9ae814
Merge pull request #177012 from hercules-ci/nixos-modular-system
`flake.lib.nixosSystem`: Allow `nixpkgs.system` to be set modularly; improve error message
2022-08-01 15:05:16 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
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-30 15:16:34 +02:00
pennae
4f91838584 nixos/misc: invariant option docs MD conversions 2022-07-24 13:01:18 +02:00
Robert Hensing
9aa588ecc3 nixos/documentation: Add unit test 2022-07-21 15:32:10 +02:00
Robert Hensing
ec3e1c6a3a nixos/documentation: Remove systemd/initrd dependency
Working towards a unit-testable documentation module.
2022-07-21 15:32:10 +02:00
Robert Hensing
08e6f45747 nixos: Declare module dependencies
Working towards a unit-testable documentation module.
2022-07-21 15:32:10 +02:00
Robert Hensing
5a98c63077 nixos: Move getty helpLine definition to getty module
Working towards a unit-testable documentation module.
2022-07-21 15:32:00 +02:00
Robert Hensing
9a0b26b216 nixos/documentation: Make extraModules configurable 2022-07-21 15:31:35 +02:00
Robert Hensing
e135c417bb nixos/documentation: Forward the specialArgs
This is necessary when generating the complete documenation for
configurations that import modules from the module arguments.
2022-07-21 15:31:35 +02:00
Sandro
769329f5f8
Merge pull request #172058 from midchildan/improvement/1pw-gid
nixos/_1password{,-gui}: use a static gid
2022-07-17 01:21:42 +02:00
Lucas Eduardo
e13404895a
nixos/label: add validation for system.nixos.label (#181479)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-07-15 11:45:25 +02:00
Robert Hensing
acd969a4dd nixos/nixpkgs.nix: Recommend hostPlatform instead of system
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.
2022-07-10 13:36:24 +02:00
Alyssa Ross
0a2337c4da
nixos/ids: fix typo in comment 2022-06-28 11:58:47 +00:00
Thomas Depierre
fc658c86f7 riak, nixos/riak: remove
Riak have been updated a lot since the version 2.2 (now 3.0.10) but
has seen no updated to the package. This is at this point
a problem forcing us to maintain old versions of erlang.

We would be happy to re accept a newer version of Riak if someone want
to spend the time to set it up.
2022-06-25 15:51:18 -04:00
Robert Hensing
985b6812d6 nixos/nixpkgs.nix: Ignore the default system in check
We might want to make this more strict at some point.
2022-06-25 10:40:41 +02:00
Robert Hensing
c9fea8c03c nixos: Add simplified nixpkgs.{hostSystem,buildSystem} 2022-06-21 14:22:36 +02:00
pennae
320aa2a791 treewide: attempt at markdown option docs 2022-06-12 12:44:38 +02:00
Robert Hensing
53326189ba
Merge pull request #174829 from blaggacao/fix/cleanup-nixpkgs-initial-system
nixos: remove effect-less nixpgks.initialSystem
2022-05-31 16:26:25 +02:00
David Arnold
646e214e11
nixos: remove effect-less nixpgks.initialSystem
- initialSystem was keeping track of the evaluating system
- it had been used by `nesting.children`
- since, 20.09, `nesting.children` has been replaced with named
  specializations

It appears that this option was left over and not cleand up properly.
2022-05-26 20:00:05 -05:00
Matthew Toohey
e41c423b01 nixos/version: add trailing newline to os-release 2022-05-25 20:25:27 -04:00
Daniel Beecham
7502133997
nixos/locate: clarification in warning message (#173247)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-05-17 16:47:33 +02:00
midchildan
2a58907251
nixos/_1password{,-gui}: use a static gid 2022-05-15 22:15:11 +09:00
Klemens Nanni
199933efdf nixos/mandoc: Leave shell argument quoting to nix
Manually crafting a quoted string that otherwise lacks any safe-guards
looks odd.

Use `escapeShellArg` instead before prepending the path.
2022-05-09 10:48:54 +02:00
Janne Heß
e2703d2697
nixos/version: Warn about using the default of system.stateVersion 2022-05-05 12:22:31 +02:00
github-actions[bot]
c57af6e8b0
Merge staging-next into staging 2022-04-08 18:11:40 +00:00
Alyssa Ross
aeed45992b
nixos/documentation: apply cleanSourceFilter
This will prevent result symlinks, etc. from causing rebuilds of the
manual.
2022-04-08 12:20:28 +00:00
Martin Weinelt
f95a3d1140 Merge remote-tracking branch 'origin/staging-next' into staging 2022-04-04 00:46:25 +02:00
Janne Heß
7cdc4dd5d1
Merge pull request #164943 from ElvishJerricco/systemd-initrd-reuse-systemd-module
initrd: Opt-in bare bones systemd-based initrd
2022-04-03 15:53:02 +02:00
Janne Heß
7ebb4ebe40
nixos/systemd-stage-1: Append (Initrd) to /etc/initrd-release
This is more in line with what dracut does (it appends "Initramfs") and
makes it clear where the boot is currently at when it hangs.
2022-04-01 13:54:09 +02:00
Artturin
c3c0444949 findutils: move {locate,updatedb} to a separate $locate output
https://github.com/NixOS/nixpkgs/issues/53925
2022-03-26 21:55:19 +02:00
Sandro
99f75e17d3
Merge pull request #164270 from alyssais/locate-pruneNames 2022-03-16 21:17:48 +01:00
Alyssa Ross
a65930ca21
nixos/locate: disable default findutils pruneNames
It doesn't make sense to have a default value for this that's
incompatible with the default locate implementation.  It means that
just doing services.locate.enable = true; generates a warning, even if
you don't care about pruning anything.  So only use the default prune
list if the locate implementation supports it (i.e., isn't findutils).
2022-03-16 11:06:38 +00:00
Vladimir Serov
0c68e23f52
nixos/modules/version: remove unnecessary quoting
(In cases it is unnecessary)
2022-03-15 14:17:59 +03:00
Peter Hoeg
bae181d3f0 nixos/os-release: generate from attrset 2022-03-04 09:36:40 +08:00
Renaud
671a068a01
Remove F-PROT package and service module (EoL) (#160372) 2022-03-02 21:51:47 +02:00
K900
cb2cfba6f7 treewide: switch all desktop file generators to new API
Notably:
- remove explicit arguments that match the defaults
- convert everything to the right Nix types
2022-02-25 13:40:38 -08:00
ajs124
9748295636
Merge pull request #160237 from helsinki-systems/drop/virtuoso
virtuoso: drop
2022-02-23 23:48:52 +01:00
ajs124
31462e501e nixos/virtuoso: drop 2022-02-16 01:01:13 +01:00
Michael Reilly
787219edaf nixos/modules/misc/wordlist: init
Addresses #16545.  Allows for user defined environment variables that
hold paths to wordlists.  This is to allow for easy access to wordlists
for users and scripts, (in other distributions a convenient wordlist is
typically found in /usr/share/dict/words or similar).  The default
wordlist is the one found in scowl, for no other reason than that's the
one that was mentioned in the linked issue.

It is possible to specify multiple environment variables as well.  This
is for users who need multiple wordlists (such as multilingual users).
2022-02-09 14:52:12 -05:00
Robert Hensing
6b9ef93b98 Revert "flake.nix: Set nixpkgs.config.path"
This reverts commit 0b222173db.
2022-01-27 12:53:29 +01:00
Robert Hensing
aa877346f8 Revert "nixos/documentation: avoid copying nixpkgs subpaths, iteration 2"
This reverts commit 15a00be189.
2022-01-27 12:35:16 +01:00
Robert Hensing
647b304306 Revert "nixos/documentation.nix: Only use store non-flake pkgs.path directly when already copied"
This reverts commit fecf325059.
2022-01-27 12:35:16 +01:00
Robert Hensing
a732a8de1c Revert "nixos/documentation.nix: Use builtins.storePath when appropriate"
This reverts commit 5d29853c38.
2022-01-27 12:33:10 +01:00
Eirik Nygaard
d53ef8b822
nixos/locate Add support for plocate (#156185) 2022-01-24 00:36:51 +01:00
Robert Hensing
5d29853c38 nixos/documentation.nix: Use builtins.storePath when appropriate 2022-01-22 16:47:02 +01:00
Robert Hensing
0b222173db flake.nix: Set nixpkgs.config.path 2022-01-22 16:43:05 +01:00
Robert Hensing
fecf325059 nixos/documentation.nix: Only use store non-flake pkgs.path directly when already copied 2022-01-22 16:42:08 +01:00
Robert Hensing
15a00be189 nixos/documentation: avoid copying nixpkgs subpaths, iteration 2
This kind of reverts commit 893ffee286.
2022-01-22 16:42:08 +01:00
Robert Hensing
98ae5a9298
Merge pull request #153211 from hercules-ci/minimal-nixos
Add minimal NixOS entrypoint
2022-01-20 14:42:46 +01:00
Justin Bedo
0fe0153003
nixos/rstudio-server: init 2022-01-17 10:24:38 +11:00
Martin Weinelt
369db3b2f3
mailpile, nixos/mailpile: drop
Still actively developed and yet stuck on python2. Also marked as
vulnerable and their issue tracker contains yet another security issue
reported in 2021/10 that the upstream hasn't acknowledged yet.

Mind blown.

Closes: #135543, #97274, #97275
2022-01-16 02:36:20 +01:00
Robert Hensing
be3967e351 nixos/nixpkgs.nix: Make independent
(cherry picked from commit 62e7f0eda1c5acf0beb13a00a23f577912a6b8eb)
2022-01-10 12:26:59 +01:00
pennae
9d3ba92d63 nixos/documentation: fix docs cross build
a few things should've used buildPackages/nativeBuildInputs to not not require
the host architecture for building docs. tested by building aarch64-linux docs
on x86_64-linux, and the result looks good.
2022-01-08 16:03:23 +01:00
Jörg Thalheim
989238ec03
Merge pull request #153426 from 4z3/systemwide-pipewire
nixos/pipewire: add systemWide option
2022-01-05 21:33:07 +00:00
kraem
893ffee286
Revert "nixos/documentation: avoid copying nixpkgs subpaths"
builtins.storePath is not allowed in pure evaluation mode

This reverts commit 1511e72b75.
2022-01-05 12:36:54 +01:00
Robert Hensing
70d27303da
Merge pull request #149532 from pennae/split-docs-build
nixos/*: split docs build
2022-01-04 22:33:23 +01:00
tv
7678a5848c nixos/pipewire: add systemWide option 2022-01-04 16:07:07 +01:00
pennae
1511e72b75 nixos/documentation: avoid copying nixpkgs subpaths
the docs build should work well even when called from a git checkout of
nixpkgs, but should avoid as much work as possible in all cases.
if pkgs.path is already a store path we can avoid copying parts of it
into the docs build sandbox by wrapping pkgs.path in builtins.storePath
2022-01-02 19:46:13 +01:00
pennae
50954ad1c5 nixos/make-options-doc: treat missing descriptions as errors by default
this partially solves the problem of "missing description" warnings of the
options doc build being lost by nix build, at the cost of failing builds that
previously ran. an option to disable this behaviour is provided.
2022-01-02 19:46:13 +01:00
pennae
fc614c37c6 nixos/documentation: split options doc build
most modules can be evaluated for their documentation in a very
restricted environment that doesn't include all of nixpkgs. this
evaluation can then be cached and reused for subsequent builds, merging
only documentation that has changed into the cached set. since nixos
ships with a large number of modules of which only a few are used in any
given config this can save evaluation a huge percentage of nixos
options available in any given config.

in tests of this caching, despite having to copy most of nixos/, saves
about 80% of the time needed to build the system manual, or about two
second on the machine used for testing. build time for a full system
config shrank from 9.4s to 7.4s, while turning documentation off
entirely shortened the build to 7.1s.
2022-01-02 19:46:13 +01:00
Martin Weinelt
15f577daaa
couchpotato, nixos/couchpotato: remove
Using python2 and abadoned upstream in 2020, last release in 2015.
2022-01-02 13:38:11 +01:00
sternenseemann
adfbfc0397 nixos/mandoc: add package option 2021-12-31 11:17:34 +01:00
sternenseemann
4942248a40 nixos/man-db: add package option 2021-12-31 11:17:34 +01:00
sternenseemann
f4f7238860 nixos/mandoc: init
Adds a NixOS module which allows using mandoc as the main manual
viewer. It can be used as a drop-in replacement for documentation.man
which relies on GNU's man-db and provides more or less the same
features.

The generateCaches option requires a different implementation for
mandoc, so it is hard to share code between the two modules -- hence it
has been implemented separately. Using both at the same time makes
little sense and wouldn't quite work, so there's an assertion to
prevent it.

To make makewhatis(8) index manual pages which are symlinks to the nix
store, we need to set READ_ALLOWED_PATH to include
`builtins.storeDir`. For background and discussion see:
https://inbox.vuxu.org/mandoc-tech/c9932669-e9d4-1454-8708-7c8e36967e8e@systemli.org/T/
2021-12-31 11:17:34 +01:00
sternenseemann
bcc4c34640 nixos/documentation: properly reference apropos(1), mention man -k
man -k is useful to mention as it is -- in constrast to apropos(1) --
actually required by POSIX.
2021-12-31 11:17:34 +01:00
sternenseemann
6a3d020b90 nixos/documentation: move man-db-specifics into new man-db module
It may be possible to revert the move of `documentation.man.manualPages`
later. The problem is that other man implementations (mandoc) want to
generate their index databases in place, so the approach taken here
doesn't translate super well.
2021-12-31 11:17:34 +01:00
Graham Christensen
06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
pennae
e24a8775a8 treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression
using the ubiquitous `cfg` shortcut bindings.
2021-12-09 01:12:13 +01:00
ajs124
eee45bb295
Merge pull request #146815 from ElvishJerricco/systemd-utils-expressions
Move systemd-lib.nix and systemd-unit-options.nix into utils
2021-12-08 15:07:28 +00:00
Silvan Mosberger
490d46f044
Merge pull request #148315 from hercules-ci/nixos-evalModules-legacy-cleanup
NixOS/evalModules legacy cleanup
2021-12-07 18:30:52 +01:00
Artturi
779a657e37
Merge pull request #148649 from Artturin/sgxgid
nixos: add sgx group with gid 304
2021-12-06 17:05:00 +02:00
Artturin
fc4df13e26 nixos: add sgx group with gid 304
fix Unknown group 'sgx', ignoring message from udev
2021-12-05 01:37:43 +02:00
pennae
2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
Robert Hensing
1a223857ab nixos/documentation: Use new extendModules instead of legacy args 2021-12-02 18:23:43 +00:00
Sandro
39b1caa278
Merge pull request #146345 from SuperSandro2000/locate-pruneBindMounts 2021-11-30 21:16:25 +01:00
Sandro
1841f5f81c
Merge pull request #146336 from SuperSandro2000/locate-fs 2021-11-30 18:06:10 +01:00
Peng Mei Yu
ce4ad53e6a nixos/webdav-server-rs: init 2021-11-30 10:19:14 +08:00
sternenseemann
55c7dfade0 nixos/documentation: index devman by default if enabled
It's quite ridiculous that we currently require manual intervention just
to have devman indexed if dev.enable == true.
2021-11-22 23:39:42 +01:00
Will Fancher
851495a752 Move systemd-lib.nix and systemd-unit-options.nix into utils 2021-11-20 17:52:29 -05:00
Sandro
d09e223320
Merge pull request #146344 from SuperSandro2000/locate-prune-names 2021-11-18 21:02:37 +01:00
Sandro Jäckel
5287d0146d
nixos/locate: PRUNE_BIND_MOUNTSFR -> PRUNE_BIND_MOUNTS
PRUNE_BIND_MOUNTSFR seems to be a typo.
The man page only mentions it in a header and further in the paragraph
it is PRUNE_BIND_MOUNTS.

Also breaks plocate which complains about the unknown option.
2021-11-17 04:26:42 +01:00
Sandro
4c138f6bd6
nixos/locate: exclude by default version control systems and .cache
follows Debian and Ubuntu
2021-11-17 04:19:53 +01:00