Compare commits
2 commits
0238865a16
...
eaaa6c9546
Author | SHA1 | Date | |
---|---|---|---|
eaaa6c9546 | |||
24f25ca3bb |
1 changed files with 6 additions and 3 deletions
|
@ -1,19 +1,22 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
pureInputs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# Taken from https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/lib/options.nix
|
# Taken from https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/lib/options.nix
|
||||||
inherit (lib) filterAttrs mapAttrs';
|
inherit (lib) filterAttrs mapAttrs';
|
||||||
flakes = filterAttrs (name: value: (value ? outputs)) inputs;
|
flakes = filterAttrs (
|
||||||
|
name: value: (value ? outputs) && (name != "self") && (name != "nixos-config")
|
||||||
|
) pureInputs;
|
||||||
nixRegistry = builtins.mapAttrs (name: v: { flake = v; }) flakes;
|
nixRegistry = builtins.mapAttrs (name: v: { flake = v; }) flakes;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nix.registry = nixRegistry;
|
nix.registry = nixRegistry;
|
||||||
environment.etc = mapAttrs' (name: value: {
|
environment.etc = mapAttrs' (name: value: {
|
||||||
name = "nix/inputs/${name}";
|
name = "nix/inputs/${name}";
|
||||||
value = {
|
value = lib.mkIf config.nix.enable {
|
||||||
source = value.outPath;
|
source = value.outPath;
|
||||||
};
|
};
|
||||||
}) flakes;
|
}) flakes;
|
||||||
|
|
Loading…
Reference in a new issue