nixpkgs-suyu/nixos/modules/services/misc
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
..
sourcehut nixos/sourcehut: add missing defaultText, escape antiquotations 2021-12-29 20:12:03 +01:00
taskserver
airsonic.nix treewide: make option descriptions constants 2021-12-09 01:21:04 +01:00
ananicy.nix nixos/ananicy: apply cgroup workaround if v2 is enabled 2022-01-06 21:55:42 +02:00
ankisyncd.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
apache-kafka.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
autofs.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
autorandr.nix
bazarr.nix
beanstalkd.nix
bees.nix nixos/beesd: avoid royal we 2021-12-30 01:20:04 +00:00
bepasty.nix
calibre-server.nix
canto-daemon.nix
cfdyndns.nix cfdyndns: fix startAt by setting it to *:0/5 instead of 5 minutes 2021-10-03 08:06:37 +03:00
cgminer.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
clipcat.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
clipmenu.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
confd.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
cpuminer-cryptonight.nix
dendrite.nix
devmon.nix
dictd.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
disnix.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
docker-registry.nix nixos: define the primary group of users where needed 2021-09-12 14:59:30 +02:00
domoticz.nix
duckling.nix
dwm-status.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
dysnomia.nix nixos/dysnomia: Type all options 2021-12-07 18:53:18 +01:00
errbot.nix
etcd.nix Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
etebase-server.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
etesync-dav.nix
ethminer.nix
exhibitor.nix treewide: add defaultText for options with simple interpolation defaults 2021-12-09 01:13:48 +01:00
felix.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
freeswitch.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
fstrim.nix
gammu-smsd.nix nixos/gammu-smsd: define group, fix after #133166 2021-09-18 14:42:08 +02:00
geoipupdate.nix
gitea.nix nixos/gitea: allow specifying dump format and name 2022-01-18 18:05:33 +01:00
gitit.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
gitlab.nix nixos/gitlab: Add additional paths to systemd.tmpfiles.rules 2022-01-25 19:05:49 +01:00
gitlab.xml
gitolite.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
gitweb.nix treewide: add literalDocBook text to options with complex defaults 2021-12-09 01:38:24 +01:00
gogs.nix treewide: add defaultText for options with simple interpolation defaults 2021-12-09 01:13:48 +01:00
gollum.nix nixos/gollum: Specify systemd WorkingDirectory 2021-10-31 13:37:00 +01:00
gpsd.nix nixos/gpsd: define group, fix after #133166 2021-09-18 14:42:08 +02:00
greenclip.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
headphones.nix treewide: add defaultText for options with simple interpolation defaults 2021-12-09 01:13:48 +01:00
heisenbridge.nix fixup! nixos/heisenbridge: Improve hardening 2022-01-13 23:33:23 +01:00
home-assistant.nix nixos/home-assistant: allow capset with components using ping command 2022-01-25 18:29:16 +01:00
ihaskell.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
irkerd.nix
jackett.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
jellyfin.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
klipper.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
leaps.nix
libreddit.nix
lidarr.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
lifecycled.nix
logkeys.nix
mame.nix nixos: explicitely set security.wrappers ownership 2021-09-13 13:48:13 +02:00
matrix-appservice-discord.nix Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
matrix-appservice-irc.nix nixos/documentation: split options doc build 2022-01-02 19:46:13 +01:00
matrix-conduit.nix nixos/matrix-conduit: init 2022-01-03 15:36:56 +01:00
matrix-synapse-log_config.yaml
matrix-synapse.nix Merge pull request #155473 from yayayayaka/matrix-synapse-administration 2022-01-25 22:10:03 +01:00
matrix-synapse.xml
mautrix-facebook.nix nixos.mautrix-facebook: init module 2021-10-04 18:40:28 -04:00
mautrix-telegram.nix nixos/mautrix-telegram: run alembic only if available 2021-12-29 19:28:24 +01:00
mbpfan.nix nixos/mbpfan: convert to structural settings 2022-01-18 21:31:33 +03:00
mediatomb.nix treewide: add defaultText to remaining options 2021-12-09 01:42:24 +01:00
metabase.nix
moonraker.nix Merge pull request #148785 from pennae/more-option-doc-staticizing 2021-12-17 11:14:08 -05:00
mx-puppet-discord.nix Merge pull request #147441 from pennae/option-doc-staticizing 2021-12-06 01:35:38 +01:00
n8n.nix n8n: 0.105.0 -> 0.160.0, fix build 2022-01-22 23:43:56 +03:00
nitter.nix nixos/nitter: remove syslog.target from service (#150224) 2021-12-11 14:45:54 -05:00
nix-daemon.nix nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
nix-gc.nix
nix-optimise.nix
nix-ssh-serve.nix nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
novacomd.nix
nzbget.nix
nzbhydra2.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
octoprint.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
ombi.nix
osrm.nix
owncast.nix nixos/owncast: init owncast service 2021-09-23 10:48:29 +02:00
packagekit.nix
paperless-ng.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
parsoid.nix
pinnwand.nix
plex.nix nixos/plex: replace literalExample with literalExpression 2021-11-16 20:37:44 +02:00
plikd.nix
podgrab.nix
prowlarr.nix nixos/prowlarr: init 2021-10-10 14:05:33 -07:00
pykms.nix
radarr.nix
redmine.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
ripple-data-api.nix nixos/ripple-data-api: define group 2021-09-18 12:00:00 +00:00
rippled.nix treewide: add literalDocBook text to options with complex defaults 2021-12-09 01:38:24 +01:00
safeeyes.nix nixos/safeeyes: add safeeyes to the global path 2021-09-22 13:12:27 +02:00
sdrplay.nix
serviio.nix
sickbeard.nix treewide: add defaultText for options with simple interpolation defaults 2021-12-09 01:13:48 +01:00
signald.nix signald: add module 2021-10-29 22:48:10 +02:00
siproxd.nix
snapper.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
sonarr.nix
spice-vdagentd.nix
ssm-agent.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
sssd.nix
subsonic.nix treewide: make option descriptions constants 2021-12-09 01:21:04 +01:00
sundtek.nix
svnserve.nix
synergy.nix
sysprof.nix
tautulli.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
tiddlywiki.nix
tp-auto-kbbl.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
tzupdate.nix
uhub.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
weechat.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
weechat.xml
xmr-stak.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
xmrig.nix nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
zigbee2mqtt.nix nixos/zigbee2mqtt: run as zigbee2mqtt group 2021-12-06 18:30:01 +01:00
zoneminder.nix treewide: make option descriptions constants 2021-12-09 01:21:04 +01:00
zookeeper.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00