2024-09-03 01:25:38 -04:00
|
|
|
{config, inputs, lib, ...}: {
|
2024-09-21 20:03:45 -04:00
|
|
|
# This will add each flake input as a registry to make nix commands consistent with your flake
|
2024-09-03 01:01:58 -04:00
|
|
|
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
|
|
|
|
2024-09-21 20:03:45 -04:00
|
|
|
# This will add your inputs to the system's legacy channels making legacy nix commands consistent
|
2024-09-03 01:01:58 -04:00
|
|
|
nix.nixPath = ["/etc/nix/path"];
|
|
|
|
environment.etc =
|
|
|
|
lib.mapAttrs'
|
|
|
|
(name: value: {
|
|
|
|
name = "nix/path/${name}";
|
|
|
|
value.source = value.flake;
|
|
|
|
})
|
|
|
|
config.nix.registry;
|
|
|
|
}
|