nixpkgs/nixos/modules/services
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
..
admin
amqp
audio Merge pull request #154180 from lovesegfault/roon-server-firewall-fix 2022-01-24 02:36:14 +00:00
backup nixos/borgbackup: remove literalDocBook in description 2022-01-20 20:10:26 +01:00
blockchain/ethereum
cluster nixos/kubernetes: actually set containerd to use systemd cgroups 2022-01-08 17:29:32 +10:00
computing Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
continuous-integration nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
databases nixos/redis: fix port option 2022-01-21 23:02:20 +01:00
desktops Merge pull request #153398 from jtojnar/tracker-subcommands 2022-01-09 16:09:35 +01:00
development nixos/rstudio-server: init 2022-01-17 10:24:38 +11:00
display-managers
editors
finance nixos/odoo: apply suggestions from review 2021-11-03 12:40:59 +01:00
games ArchiSteamFarm: 5.2.0.10 -> 5.2.1.5; ASF-ui: update 2022-01-09 20:26:03 -06:00
hardware nixos/modules/services/hardware/triggerhappy.nix: mpc_cli -> mpc-cli 2022-01-24 23:24:06 -03:00
logging nixos/logrotate: rotate login/logout logs by default 2021-12-29 02:07:02 +01:00
mail Merge pull request #152367 from helsinki-systems/fix/dovecot-ssh_dh 2022-01-22 18:07:16 +00:00
matrix nixos/mjolnir: set rawHomeserverUrl in config 2021-11-16 19:21:33 +01:00
misc nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
monitoring nixos/netdata: expose /etc/netdata 2022-01-10 23:56:57 +02:00
network-filesystems nixos/glusterfs: remove syslog.target from services 2021-12-11 22:43:02 +01:00
networking Merge pull request #156787 from helsinki-systems/drop/racoon 2022-01-26 23:30:20 +01:00
printing
scheduling
search nixos/elasticsearch: fix postStart to allow non-localhost listenAddress 2021-12-30 19:03:35 +01:00
security nixos/tor: fix tor getting killed by systemd when shuttding down 2022-01-25 15:02:18 +01:00
system Update nixos/modules/services/system/cachix-agent/default.nix 2022-01-18 16:49:18 +01:00
torrent Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
ttys nixos/getty: remove serialSpeed 2021-11-19 10:17:26 +01:00
video Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
wayland nixos/cage: log to journal 2021-12-16 23:55:15 +00:00
web-apps Merge pull request #155847 from onny/dokuwikicleanup 2022-01-24 13:42:57 +01:00
web-servers nixos/nginx: Add defaultListenAddresses option 2022-01-24 02:20:30 +01:00
x11 Merge pull request #155478 from ivanbrennan/xmonad-enable-configured-recompile 2022-01-20 11:27:13 +01:00