nixpkgs-suyu/nixos/modules
David Arnold ecae25c3ef
nixos/nix-daemon: fix registry flake type
Before this commit, the `flake` option was typed with `types.unspecified`.

This type get's merged via [`mergeDefaultOption`](ebb592a04c/lib/options.nix (L119-L128)), which has a line
```nix
else if all isFunction list then x: mergeDefaultOption loc (map (f: f x) list)
```

`lib.isFunction` detects an attrs in the shape of `{__functor = ...}` as
a function and hence this line substitutes such attrs with a function
(f: f x).

If now, a flake input has a `__functor` as it's output, this will
coerce the once attrs to a function. This breaks a lot of things later
in the stack, for example a later `lib.filterAttrs seive <LAMBDA>` will
fail for obious reasons.

According to @infinisil, `types.unspecified` is due to deprecation. In
the meantime this PR provides a specific fix for the specific problem
discovered.
2021-08-01 14:56:13 -05:00
..
config Merge pull request #110742 from siraben/deprecate-fold 2021-07-27 15:13:31 +07:00
hardware Merge pull request #121530 from symphorien/wifireg 2021-07-27 16:43:57 +00:00
i18n/input-method
installer nix-fallback-paths.nix: Update to 2.3.15 2021-07-28 22:45:33 +02:00
misc Merge pull request #110742 from siraben/deprecate-fold 2021-07-27 15:13:31 +07:00
profiles
programs Merge pull request #128841 from Artturin/udevil 2021-07-22 15:55:21 +02:00
security
services nixos/nix-daemon: fix registry flake type 2021-08-01 14:56:13 -05:00
system Merge pull request #131102 from helsinki-systems/feat/rework-etc-2 2021-07-31 03:57:59 +01:00
tasks Merge pull request #131587 from hyperfekt/systemd-pstore 2021-07-27 14:27:15 +02:00
testing
virtualisation nixos/virtualbox-image: cast baseImageFreeSpace into str 2021-08-01 18:59:08 +00:00
module-list.nix Merge pull request #129468 from jwygoda/litestream-service 2021-07-31 22:58:48 -04:00
rename.nix