From 8938c60ce716ce04fcecbcb7cb7bbe4f3fd1787c Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 8 Nov 2023 21:48:56 +0800 Subject: [PATCH] project: rename `self` flake input to `config` --- flake.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 9484016..42308f3 100644 --- a/flake.nix +++ b/flake.nix @@ -11,8 +11,18 @@ nixosConfigurations.desktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ({ config, lib, ... }: { - nix.registry = lib.mapAttrs (_: flake: { inherit flake; }) inputs; + ({ config, lib, pkgs, ... }: { + # Setting each of the flake inputs as part of the system registry + # including our own flake which is just renamed from "self" to + # "config". + nix.registry = + lib.mapAttrs' + (name: flake: + let + name' = if (name == "self") then "config" else name; + in + lib.nameValuePair name' { inherit flake; }) + inputs; }) ./hosts/desktop ];