Compare commits

..

2 commits

Author SHA1 Message Date
eaaa6c9546 remove nix registry if nix is disabled
Some checks reported errors
Hydra nixosConfigurations.not522 Hydra build #25196 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.not522-installer Hydra build #25197 of nixos-config:pr618:nixosConfigurations.not522-installer
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #25193 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #25194 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra nixosConfigurations.rainbow-resort Hydra build #25199 of nixos-config:pr618:nixosConfigurations.rainbow-resort
Hydra packages.x86_64-linux.package-updater Hydra build #25203 of nixos-config:pr618:packages.x86_64-linux.package-updater
Hydra packages.aarch64-linux.package-updater Hydra build #25201 of nixos-config:pr618:packages.aarch64-linux.package-updater
Hydra packages.riscv64-linux.package-updater Hydra build #25202 of nixos-config:pr618:packages.riscv64-linux.package-updater
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #25195 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.thinkrac Hydra build #25200 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra nixosConfigurations.pc-installer Hydra build #25198 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra checks.x86_64-linux.containers-default Hydra build #25192 of nixos-config:pr618:checks.x86_64-linux.containers-default
2024-11-11 10:28:36 +01:00
24f25ca3bb use pureInputs and filter out nixos-configuration for nix registry 2024-11-11 10:27:54 +01:00

View file

@ -1,19 +1,22 @@
{
lib,
inputs,
pureInputs,
config,
...
}:
let
# Taken from https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/lib/options.nix
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;
in
{
nix.registry = nixRegistry;
environment.etc = mapAttrs' (name: value: {
name = "nix/inputs/${name}";
value = {
value = lib.mkIf config.nix.enable {
source = value.outPath;
};
}) flakes;