nixpkgs/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
ananicy.nix nixos/ananicy: apply cgroup workaround if v2 is enabled 2022-01-06 21:55:42 +02:00
ankisyncd.nix
apache-kafka.nix
autofs.nix
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
cgminer.nix
clipcat.nix
clipmenu.nix
confd.nix
cpuminer-cryptonight.nix
dendrite.nix
devmon.nix
dictd.nix
disnix.nix
docker-registry.nix
domoticz.nix
duckling.nix
dwm-status.nix
dysnomia.nix
errbot.nix
etcd.nix
etebase-server.nix
etesync-dav.nix
ethminer.nix
exhibitor.nix
felix.nix
freeswitch.nix
fstrim.nix
gammu-smsd.nix
geoipupdate.nix
gitea.nix nixos/gitea: allow specifying dump format and name 2022-01-18 18:05:33 +01:00
gitit.nix
gitlab.nix nixos/gitlab: Add additional paths to systemd.tmpfiles.rules 2022-01-25 19:05:49 +01:00
gitlab.xml
gitolite.nix
gitweb.nix
gogs.nix
gollum.nix
gpsd.nix
greenclip.nix
headphones.nix
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
irkerd.nix
jackett.nix
jellyfin.nix
klipper.nix
leaps.nix
libreddit.nix
lidarr.nix
lifecycled.nix
logkeys.nix
mame.nix
matrix-appservice-discord.nix
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
mautrix-telegram.nix
mbpfan.nix nixos/mbpfan: convert to structural settings 2022-01-18 21:31:33 +03:00
mediatomb.nix
metabase.nix
moonraker.nix
mx-puppet-discord.nix
n8n.nix n8n: 0.105.0 -> 0.160.0, fix build 2022-01-22 23:43:56 +03:00
nitter.nix
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
octoprint.nix
ombi.nix
osrm.nix
owncast.nix
packagekit.nix
paperless-ng.nix
parsoid.nix
pinnwand.nix
plex.nix
plikd.nix
podgrab.nix
prowlarr.nix
pykms.nix
radarr.nix
redmine.nix
ripple-data-api.nix
rippled.nix
safeeyes.nix
sdrplay.nix
serviio.nix
sickbeard.nix
signald.nix
siproxd.nix
snapper.nix
sonarr.nix
spice-vdagentd.nix
ssm-agent.nix
sssd.nix
subsonic.nix
sundtek.nix
svnserve.nix
synergy.nix
sysprof.nix
tautulli.nix
tiddlywiki.nix
tp-auto-kbbl.nix
tzupdate.nix
uhub.nix
weechat.nix
weechat.xml
xmr-stak.nix
xmrig.nix
zigbee2mqtt.nix
zoneminder.nix
zookeeper.nix