fix(clanLib): propagate clanLib into module apply

This commit is contained in:
Johannes Kirschbauer
2025-05-21 19:00:46 +02:00
parent f16cfe68b6
commit c4980d3990
10 changed files with 36 additions and 15 deletions

View File

@@ -3,12 +3,13 @@
## Add any logic to ./module.nix
{
lib,
clanLib,
...
}:
{
flakePartsModule = {
imports = [
./interface.nix
(lib.modules.importApply ./interface.nix { inherit clanLib; })
./module.nix
];
};

View File

@@ -1,9 +1,13 @@
{ pkgs, lib }:
{
pkgs,
lib,
clanLib,
}:
let
eval = lib.evalModules {
class = "nixos";
modules = [
./interface.nix
(lib.modules.importApply ./interface.nix { inherit clanLib; })
];
};
evalDocs = pkgs.nixosOptionsDoc {

View File

@@ -19,6 +19,7 @@ in
let
jsonDocs = import ./eval-docs.nix {
inherit pkgs lib;
inherit (self) clanLib;
};
in
{

View File

@@ -18,7 +18,7 @@ module:
;
};
modules = [
./interface.nix
(lib.modules.importApply ./interface.nix { inherit (clan-core) clanLib; })
module
{
inherit specialArgs;

View File

@@ -1,3 +1,4 @@
{ clanLib }:
{
lib,
self,
@@ -94,7 +95,11 @@ in
};
inventory = lib.mkOption {
type = types.submodule { imports = [ ../inventory/build-inventory/interface.nix ]; };
type = types.submodule {
imports = [
(lib.modules.importApply ../inventory/build-inventory/interface.nix { inherit clanLib; })
];
};
description = ''
The `Inventory` submodule.