mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 18:24:53 +00:00
Under a given edge case, the code in nixConf of formats.nix will fail
incorrectly while rendering a pretty abort msg because lib.toPretty does
not exist. This fixes this, inheriting toPretty from lib.generators.
Then under the given edge case, nixConf fails correctly with a pretty
abort msg.
The edge case is playing with in nixos/modules/config/nix.nix with the
type of nix.settings s.t. a value not supported by nixConf gets accepted
as a value inside `nix.settings`.
A quick way to reproduce this edge case is by appending
```nix
apply = v: { };
```
to the option declaration of `nix.settings.substituters`,
then evaluting any nixos config, e.g.:
`nix build .#nixosTests.systemd-journal-upload`