modules: move clan module to flake.modules.clan.default

This commit is contained in:
Johannes Kirschbauer
2025-06-26 17:06:46 +02:00
parent 5f4775ef10
commit f6de6632e4
8 changed files with 20 additions and 17 deletions

View File

@@ -9,8 +9,6 @@ clan-core:
let
inherit (lib) types;
clanLib = clan-core.clanLib;
in
{
# Backwards compatibility
@@ -37,7 +35,7 @@ in
# inventoryInterface = {};
};
modules = [
clanLib.module
clan-core.modules.clan.default
];
};
};

View File

@@ -170,6 +170,7 @@ in
{
imports = [
../test/container-test-driver/driver-module.nix
];
options = {
clanSettings = mkOption {
@@ -197,7 +198,7 @@ in
self = throw "set clan.directory in the test";
};
modules = [
clanLib.module
clan-core.modules.clan.default
{
_prefix = [
"checks"

View File

@@ -19,15 +19,6 @@ lib.fix (
);
in
{
module = {
_class = "clan";
_module.args = {
inherit clanLib;
};
imports = [
./modules/clan/default.nix
];
};
inherit (buildClanLib)
buildClan

View File

@@ -1,4 +1,10 @@
{ clan-core }:
{
_class = "clan";
_module.args = {
inherit clan-core;
inherit (clan-core) clanLib;
};
imports = [
./module.nix
./interface.nix

View File

@@ -0,0 +1,4 @@
{ self, lib, ... }:
{
flake.modules.clan.default = lib.modules.importApply ./default.nix { clan-core = self; };
}

View File

@@ -1,12 +1,12 @@
{
pkgs,
lib,
clanLib,
clan-core,
}:
let
eval = lib.evalModules {
modules = [
clanLib.module
clan-core.modules.clan.default
];
};
evalDocs = pkgs.nixosOptionsDoc {

View File

@@ -9,6 +9,9 @@ let
);
in
{
imports = [
./clan/flake-module.nix
];
perSystem =
{
pkgs,
@@ -19,7 +22,7 @@ in
let
jsonDocs = import ./eval-docs.nix {
inherit pkgs lib;
inherit (self) clanLib;
clan-core = self;
};
in
{

View File

@@ -11,7 +11,7 @@ let
lib.evalModules {
specialArgs = { inherit clan-core nix-darwin clanLib; };
modules = [
../../clan/default.nix
clan-core.modules.clan.default
{
self = { };
}