modules: move clan docs into clan-module
This commit is contained in:
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user