Merge pull request 'build-clan: always use a single entry point' (#4089) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4089
This commit is contained in:
@@ -16,7 +16,7 @@ let
|
|||||||
localModuleSet ? { },
|
localModuleSet ? { },
|
||||||
}:
|
}:
|
||||||
(lib.evalModules {
|
(lib.evalModules {
|
||||||
# TODO: remove clanLib from specialArgs
|
# TODO: move clanLib from specialArgs to options
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit clanLib;
|
inherit clanLib;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,14 @@ in
|
|||||||
{
|
{
|
||||||
inherit (services) evalClanService mapInstances resolveModule;
|
inherit (services) evalClanService mapInstances resolveModule;
|
||||||
inherit (import ./build-inventory { inherit lib clanLib; }) buildInventory;
|
inherit (import ./build-inventory { inherit lib clanLib; }) buildInventory;
|
||||||
interface = lib.modules.importApply ./build-inventory/interface.nix { inherit clanLib; };
|
interface = {
|
||||||
|
imports = [
|
||||||
|
(import ./build-inventory/interface.nix { inherit clanLib; })
|
||||||
|
];
|
||||||
|
_module.args = {
|
||||||
|
inherit clanLib;
|
||||||
|
};
|
||||||
|
};
|
||||||
# Returns the list of machine names
|
# Returns the list of machine names
|
||||||
# { ... } -> [ string ]
|
# { ... } -> [ string ]
|
||||||
resolveTags =
|
resolveTags =
|
||||||
|
|||||||
10
lib/modules/clan/default.nix
Normal file
10
lib/modules/clan/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ clanLib }:
|
||||||
|
{
|
||||||
|
_module.args = {
|
||||||
|
inherit clanLib;
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
|
./module.nix
|
||||||
|
./interface.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ clanLib }:
|
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
clanLib,
|
||||||
self,
|
self,
|
||||||
# TODO: Use dependency injection to allow for testing
|
# TODO: Use dependency injection to allow for testing
|
||||||
# inventoryInterface,
|
# inventoryInterface,
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
{
|
{
|
||||||
flakePartsModule = {
|
flakePartsModule = {
|
||||||
imports = [
|
imports = [
|
||||||
(lib.modules.importApply ./clan/interface.nix { inherit clanLib; })
|
(lib.modules.importApply ./clan/default.nix { inherit clanLib; })
|
||||||
./clan/module.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ let
|
|||||||
eval = lib.evalModules {
|
eval = lib.evalModules {
|
||||||
class = "nixos";
|
class = "nixos";
|
||||||
modules = [
|
modules = [
|
||||||
(lib.modules.importApply ./clan/interface.nix { inherit clanLib; })
|
(import ./clan/default.nix { inherit clanLib; })
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
evalDocs = pkgs.nixosOptionsDoc {
|
evalDocs = pkgs.nixosOptionsDoc {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ module:
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
(lib.modules.importApply ./clan/interface.nix { inherit (clan-core) clanLib; })
|
(import ./clan/default.nix { inherit (clan-core) clanLib; })
|
||||||
module
|
module
|
||||||
{
|
{
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
|
|||||||
Reference in New Issue
Block a user