build-clan: move clan attribute relates modules into subfolder

This commit is contained in:
Johannes Kirschbauer
2025-06-24 09:52:26 +02:00
parent afc001cc54
commit 9fcbb6d688
9 changed files with 14 additions and 14 deletions

View File

@@ -90,7 +90,7 @@ in
}; };
templates = lib.mkOption { templates = lib.mkOption {
type = types.submodule { imports = [ ./templates/interface.nix ]; }; type = types.submodule { imports = [ ./templates.nix ]; };
default = { }; default = { };
description = '' description = ''
Define Clan templates. Define Clan templates.
@@ -100,7 +100,7 @@ in
inventory = lib.mkOption { inventory = lib.mkOption {
type = types.submodule { type = types.submodule {
imports = [ imports = [
(lib.modules.importApply ../inventory/build-inventory/interface.nix { inherit clanLib; }) (lib.modules.importApply ../../inventory/build-inventory/interface.nix { inherit clanLib; })
]; ];
}; };
description = '' description = ''
@@ -116,13 +116,13 @@ in
Global information about the clan. Global information about the clan.
''; '';
type = types.deferredModuleWith { type = types.deferredModuleWith {
staticModules = [ ../inventory/build-inventory/meta-interface.nix ]; staticModules = [ ../../inventory/build-inventory/meta-interface.nix ];
}; };
default = { }; default = { };
}; };
secrets = lib.mkOption { secrets = lib.mkOption {
type = types.submodule { imports = [ ./secrets/interface.nix ]; }; type = types.submodule { imports = [ ./secrets.nix ]; };
description = '' description = ''
Secrets related options such as AGE plugins required to encrypt/decrypt secrets using the CLI. Secrets related options such as AGE plugins required to encrypt/decrypt secrets using the CLI.
''; '';

View File

@@ -120,7 +120,7 @@ let
moduleSystemConstructor.${machineClasses.${name}} { moduleSystemConstructor.${machineClasses.${name}} {
modules = [ modules = [
(config.outputs.moduleForMachine.${name} or { }) (config.outputs.moduleForMachine.${name} or { })
(lib.modules.importApply ./machineModules/overridePkgs.nix { (lib.modules.importApply ../machineModules/overridePkgs.nix {
pkgs = pkgsFor.${system}; pkgs = pkgsFor.${system};
}) })
]; ];
@@ -201,7 +201,7 @@ in
in in
{ {
imports = [ imports = [
(lib.modules.importApply ./machineModules/forName.nix { (lib.modules.importApply ../machineModules/forName.nix {
inherit (config.inventory) meta; inherit (config.inventory) meta;
inherit inherit
name name

View File

@@ -9,8 +9,8 @@
{ {
flakePartsModule = { flakePartsModule = {
imports = [ imports = [
(lib.modules.importApply ./interface.nix { inherit clanLib; }) (lib.modules.importApply ./clan/interface.nix { inherit clanLib; })
./module.nix ./clan/module.nix
]; ];
}; };
@@ -68,7 +68,7 @@
imports = [ imports = [
rest rest
# implementation # implementation
./module.nix ./clan/module.nix
]; ];
}; };
in in

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ in
let let
config = buildClan { config = buildClan {
meta.name = "test"; meta.name = "test";
imports = [ ./module.nix ]; imports = [ ./clan/module.nix ];
}; };
in in
{ {
@@ -42,7 +42,7 @@ in
outPath = ./.; outPath = ./.;
}; };
meta.name = "test"; meta.name = "test";
imports = [ ./module.nix ]; imports = [ ./clan/module.nix ];
}; };
in in
{ {
@@ -82,7 +82,7 @@ in
inventory.meta.name = "test"; inventory.meta.name = "test";
} }
./module.nix ./clan/module.nix
# Explicit output, usually defined by flake-parts # Explicit output, usually defined by flake-parts
{ options.nixosConfigurations = lib.mkOption { type = lib.types.raw; }; } { options.nixosConfigurations = lib.mkOption { type = lib.types.raw; }; }
]; ];