From 81f351c4feb807797f1bd5b671936a52f40eb2c4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 6 Jun 2021 17:01:56 +0200 Subject: auto-generate flake registry --- system-profiles/core.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/system-profiles/core.nix b/system-profiles/core.nix index 49869e60..c31ba0c4 100644 --- a/system-profiles/core.nix +++ b/system-profiles/core.nix @@ -53,12 +53,11 @@ in { "nixpkgs=${flakeInputs.nixpkgs.legacyPackages.${config.nixpkgs.system}.path}" "nixpkgs-overlays=${flake.overlays-path.${config.nixpkgs.system}}" ]; - registry = { - nixpkgs.flake = flakeInputs.nixpkgs; - home-manager.flake = flakeInputs.home-manager; - sops-nix.flake = flakeInputs.sops-nix; - nixos.flake = flake; - }; + registry = + let override = { self = "nixos"; }; + in lib.mapAttrs' (inpName: inpFlake: lib.nameValuePair + (override.${inpName} or inpName) + { flake = inpFlake; } ) flakeInputs; }; users.mutableUsers = false; -- cgit v1.2.3