David Arnold a791442a31 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.

(cherry picked from commit ecae25c3ef137d972e909eb0e85960d90481789e)
2021-08-01 22:09:08 +00:00
..
2020-11-24 12:42:06 -05:00
2021-05-23 01:01:51 +02:00
2021-06-11 14:52:30 +00:00
2021-07-20 22:32:07 -04:00
2021-07-01 03:11:24 +00:00
2021-05-18 08:29:37 -07:00
2021-06-25 23:32:04 +02:00
2021-07-23 10:33:24 +00:00
2021-06-07 17:34:08 -07:00