nixpkgs-suyu/nixos/modules/system/boot
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
..
loader nixos/systemd-boot: fix error output 2022-01-14 15:42:19 -08:00
binfmt.nix nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
emergency-mode.nix
grow-partition.nix
initrd-network.nix
initrd-openvpn.nix
initrd-ssh.nix
kernel.nix treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
kernel_config.nix
kexec.nix
luksroot.nix
modprobe.nix nixos/modprobe: add boot.initrd.extraModprobeConfig option 2022-01-24 22:56:14 +01:00
networkd.nix nixos/networking: fix assertion on IPMasquerade 2022-01-20 13:43:12 +01:00
pbkdf2-sha512.c
plymouth.nix treewide: add literalDocBook text to options with complex defaults 2021-12-09 01:38:24 +01:00
resolved.nix nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
shutdown.nix
stage-1-init.sh nixos/stage-1: colon-separated multi-device support 2022-01-09 18:06:03 -06:00
stage-1.nix nixos/modprobe: add boot.initrd.extraModprobeConfig option 2022-01-24 22:56:14 +01:00
stage-2-init.sh nixos/systemd: set TZDIR for PID 1 2021-12-16 04:09:07 +01:00
stage-2.nix
systemd-nspawn.nix Move systemd-lib.nix and systemd-unit-options.nix into utils 2021-11-20 17:52:29 -05:00
systemd.nix stdenv/generic: introduce shellDryRun 2021-12-27 20:30:01 -05:00
timesyncd.nix nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
tmp.nix