nixpkgs/nixos/modules
polykernel 34636a8525 nixos/nix-daemon: Fix merging order for substituters option
The `substituters` option in `nix.settings` uses the order
of the substituters listed to define priority. Prior to https://github.com/NixOS/nixpkgs/pull/139075,
the corresponding option `binaryCaches` is declared in the `nix` namespace,
which is guaranteed to be merged last. However, the order of merging isn't
guaranteed in submodules. This cause definitions to be appended to the default
value instead of prepended, breaking backwards compatibility as reported in https://github.com/NixOS/nixpkgs/issues/158356.

The way this is addressed in the module system is with order priorities via
`mkOrder` and sorting definitions before merging. This PR restores the previous
behavior by setting a higher priority to the substituters option defined internally,
thus all definitions with default priority will be merged before it. This was chosen because
the `mkRenamedOption` function does not preserve order priority so users using legacy options do not have
precise control on placement.

This change should suffice for simple configuration, but further revision to the module system
is needed for to make various `mk*` functions  aware of order priorities.
2022-02-12 17:15:31 -05:00
..
config nixos/users: Fix type error 2022-02-05 22:38:56 +01:00
hardware nixos/nvidia: remove obsolete GDM on Wayland assertion 2022-02-01 19:22:04 +01:00
i18n/input-method nixos/documentation: split options doc build 2022-01-02 19:46:13 +01:00
installer nixos/nixos-generate-config: move dhcpConfig from configuration.nix to hardware-configuration.nix 2022-02-09 19:35:19 +02:00
misc Revert "flake.nix: Set nixpkgs.config.path" 2022-01-27 12:53:29 +01:00
profiles nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
programs Merge pull request #155162 from ZenithalHourlyRate/command-not-found-interactive 2022-02-08 15:30:05 -08:00
security google-compute-config: update config 2022-02-05 23:33:10 +03:00
services nixos/nix-daemon: Fix merging order for substituters option 2022-02-12 17:15:31 -05:00
system nixos/switch-to-configuration: Don't stop swaps in dry-activate 2022-02-09 15:14:38 +01:00
tasks nixos/networking: Typo fix 2022-02-04 13:55:56 -05:00
testing nixos/tests: also set TimeoutStart in systemd.user.extraConfig 2022-01-21 04:18:05 +01:00
virtualisation Merge pull request #157761 from tp-la/amazon-ec2-utils 2022-02-07 01:53:35 +01:00
module-list.nix Merge pull request #159095 from helsinki-systems/drop/nixos-gogoclient 2022-02-11 13:31:45 +01:00
rename.nix nixos/gogoclient: drop 2022-02-11 01:31:09 +01:00