2024-10-30 08:06:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
# Taken from https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/lib/options.nix
|
|
|
|
inherit (lib) filterAttrs mapAttrs';
|
2024-11-05 13:01:49 +00:00
|
|
|
flakes = filterAttrs (name: value: (value ? outputs)) inputs;
|
2024-10-30 08:06:52 +00:00
|
|
|
nixRegistry =
|
|
|
|
builtins.mapAttrs
|
|
|
|
(name: v: {flake = v;})
|
|
|
|
flakes;
|
|
|
|
in {
|
|
|
|
nix.registry = nixRegistry;
|
|
|
|
environment.etc =
|
|
|
|
mapAttrs'
|
|
|
|
(name: value: {
|
|
|
|
name = "nix/inputs/${name}";
|
|
|
|
value = {source = value.outPath;};
|
|
|
|
})
|
|
|
|
flakes;
|
|
|
|
nix.nixPath = ["/etc/nix/inputs"];
|
|
|
|
}
|