nixpkgs/nixos/doc/manual
polykernel 4a9d9928dc nixos/nix-daemon: use structural settings
The `nix.*` options, apart from options for setting up the
daemon itself, currently provide a lot of setting mappings
for the Nix daemon configuration. The scope of the mapping yields
convience, but the line where an option is considered essential
is blurry. For instance, the `extra-sandbox-paths` mapping is
provided without its primary consumer, and the corresponding
`sandbox-paths` option is also not mapped.

The current system increases the maintenance burden as maintainers have to
closely follow upstream changes. In this case, there are two state versions
of Nix which have to be maintained collectively, with different options
avaliable.

This commit aims to following the standard outlined in RFC 42[1] to
implement a structural setting pattern. The Nix configuration is encoded
at its core as key-value pairs which maps nicely to attribute sets, making
it feasible to express in the Nix language itself. Some existing options are
kept such as `buildMachines` and `registry` which present a simplified interface
to managing the respective settings. The interface is exposed as `nix.settings`.

Legacy configurations are mapped to their corresponding options under `nix.settings`
for backwards compatibility.

Various options settings in other nixos modules and relevant tests have been
updated to use structural setting for consistency.

The generation and validation of the configration file has been modified to
use `writeTextFile` instead of `runCommand` for clarity. Note that validation
is now mandatory as strict checking of options has been pushed down to the
derivation level due to freeformType consuming unmatched options. Furthermore,
validation can not occur when cross-compiling due to current limitations.

A new option `publicHostKey` was added to the `buildMachines`
submodule corresponding to the base64 encoded public host key settings
exposed in the builder syntax. The build machine generation was subsequently
rewritten to use `concatStringsSep` for better performance by grouping
concatenations.

[1] - https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
2022-01-26 21:04:50 -05:00
..
administration postgresql_9_6: drop 2021-12-03 01:14:29 +01:00
configuration nixos/doc: improve example of renaming network interfaces 2021-11-21 20:12:31 -08:00
development update docs 2022-01-26 10:46:46 +01:00
from_md nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
installation [21.11] update README.md 2021-11-29 20:15:35 -05:00
release-notes nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
.gitignore
contributing-to-this-manual.chapter.md nixos/doc: convert "Contributing to this manual" to CommonMark 2021-05-22 18:14:49 -07:00
default.nix nixos/documentation: fix docs cross build 2022-01-08 16:03:23 +01:00
Makefile nixos/doc/manual/Makefile: Do not format 2021-03-22 21:15:11 +01:00
man-configuration.xml
man-nixos-build-vms.xml nixos/doc/*: editorconfig fixes 2020-07-31 15:08:54 +10:00
man-nixos-enter.xml nixos/doc: Improve code listings 2020-09-23 01:25:25 +02:00
man-nixos-generate-config.xml
man-nixos-install.xml nixos-install: support --no-root-password 2021-11-22 22:09:50 +02:00
man-nixos-option.xml
man-nixos-rebuild.xml nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
man-nixos-version.xml nixos/doc: Improve code listings 2020-09-23 01:25:25 +02:00
man-pages.xml
manual.xml nixos/doc: convert "Contributing to this manual" to CommonMark 2021-05-22 18:14:49 -07:00
md-to-db.sh nixos/doc/md-to-db.sh: handle path to nixpkgs with spaces 2021-10-10 11:57:51 +02:00
preface.xml Link to Libera, Matrix instead of Freenode 2021-07-06 16:35:37 +02:00
README.md nixos/manual: Fix link to contributing guide 2021-07-16 22:55:28 -07:00
shell.nix mkShell: introduce packages argument (#122180) 2021-05-13 19:17:29 +02:00