nixpkgs-suyu/pkgs
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
..
applications spotify-unwrapped: 1.1.72.439.gc253025e -> 1.1.77.643.g3c4c6fc6 2022-01-27 00:09:40 +00:00
build-support nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
common-updater
data
desktops Merge pull request #156801 from bobby285271/pantheon 2022-01-26 21:01:16 +08:00
development resholve: work around nixpkgs aarch64-darwin issues (#155251) 2022-01-27 10:37:34 +09:00
games Merge remote-tracking branch 'origin/master' into staging-next 2022-01-25 15:53:19 +01:00
misc vscode-extensions.elmtooling.elm-ls-vscode: 2.0.1 -> 2.4.0 (#156361) 2022-01-26 04:26:30 -05:00
os-specific Merge pull request #156787 from helsinki-systems/drop/racoon 2022-01-26 23:30:20 +01:00
pkgs-lib
servers postfix: 3.6.3 -> 3.6.4 2022-01-26 19:24:34 +00:00
shells Merge pull request #155362 from kampka/dash-test 2022-01-25 22:18:30 +01:00
stdenv
test
tools Merge pull request #156603 from mweinelt/esphome 2022-01-26 23:43:56 +01:00
top-level Merge pull request #156001 from helsinki-systems/upd/tulip 2022-01-26 23:33:44 +01:00