diff --git a/flakeModules/clan.nix b/flakeModules/clan.nix index 4c3456998..95892d721 100644 --- a/flakeModules/clan.nix +++ b/flakeModules/clan.nix @@ -13,16 +13,15 @@ let publicAttrs = import ../lib/build-clan/public.nix; # Create output options only for listed attributes + # TODO: Refactor this into an explicit module, so we can have description and other attributes to be listed in flake-parts outputModule = { clan = lib.genAttrs publicAttrs.clan ( - name: - config.clan.clanInternals.${name} - or (throw "Output: clanInternals.${name} not found. Check: ${config.file}") + name: config.clan.${name} or (throw "Output: clan.${name} not found.") ); topLevel = { options = lib.genAttrs publicAttrs.topLevel (_: lib.mkOption { }); config = lib.genAttrs publicAttrs.topLevel ( - name: config.clan.${name} or (throw "Output: clan.${name} not found. See: ${config.file}") + name: config.clan.${name} or (throw "Output: clan.${name} not found.") ); }; }; diff --git a/lib/build-clan/module.nix b/lib/build-clan/module.nix index 7df034d34..a3de32f2d 100644 --- a/lib/build-clan/module.nix +++ b/lib/build-clan/module.nix @@ -150,7 +150,9 @@ in inventory._inventoryFile = file; } ]; - inventory = inventoryLoaded; + # Weirdly this works only if it is a function + # This seems to be a bug in nixpkgs + inventory = _: lib.setDefaultModuleLocation file inventoryLoaded; } ) { diff --git a/lib/build-clan/public.nix b/lib/build-clan/public.nix index cc302ac49..73e7978e4 100644 --- a/lib/build-clan/public.nix +++ b/lib/build-clan/public.nix @@ -5,7 +5,7 @@ This list is used to guarantee equivalent attribute sets for both flake-parts and buildClan users. */ { - # flake.clan.{name} <- clanInternals.{name} + # flake.clan.{name} <- clan.{name} clan = [ "templates" "modules"