modules: move clan docs into clan-module

This commit is contained in:
Johannes Kirschbauer
2025-10-23 17:52:39 +02:00
parent 04b52d5bee
commit 1f8c2a3722
3 changed files with 27 additions and 23 deletions

View File

@@ -1,19 +1,20 @@
{
pkgs,
lib,
clan-core,
clanModule,
clanLib,
}:
let
eval = lib.evalModules {
modules = [
clan-core.modules.clan.default
clanModule
];
};
evalDocs = pkgs.nixosOptionsDoc {
options = eval.options;
warningsAreErrors = false;
transformOptions = clan-core.clanLib.docs.stripStorePathsFromDeclarations;
transformOptions = clanLib.docs.stripStorePathsFromDeclarations;
};
in
{

View File

@@ -1,4 +1,26 @@
{ self, lib, ... }:
let
clanModule = lib.modules.importApply ./default.nix { clan-core = self; };
in
{
flake.modules.clan.default = lib.modules.importApply ./default.nix { clan-core = self; };
flake.modules.clan.default = clanModule;
perSystem =
{
pkgs,
lib,
...
}:
let
jsonDocs = import ./eval-docs.nix {
inherit
pkgs
lib
clanModule
;
clanLib = self.clanLib;
};
in
{
legacyPackages.clan-options = jsonDocs.optionsJSON;
};
}

View File

@@ -1,24 +1,5 @@
{
self,
...
}:
{
imports = [
./clan/flake-module.nix
];
perSystem =
{
pkgs,
lib,
...
}:
let
jsonDocs = import ./eval-docs.nix {
inherit pkgs lib;
clan-core = self;
};
in
{
legacyPackages.clan-options = jsonDocs.optionsJSON;
};
}