modules: move clan docs into clan-module
This commit is contained in:
@@ -1,19 +1,20 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
clan-core,
|
clanModule,
|
||||||
|
clanLib,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
eval = lib.evalModules {
|
eval = lib.evalModules {
|
||||||
modules = [
|
modules = [
|
||||||
clan-core.modules.clan.default
|
clanModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
evalDocs = pkgs.nixosOptionsDoc {
|
evalDocs = pkgs.nixosOptionsDoc {
|
||||||
options = eval.options;
|
options = eval.options;
|
||||||
warningsAreErrors = false;
|
warningsAreErrors = false;
|
||||||
transformOptions = clan-core.clanLib.docs.stripStorePathsFromDeclarations;
|
transformOptions = clanLib.docs.stripStorePathsFromDeclarations;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,26 @@
|
|||||||
{ self, lib, ... }:
|
{ 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 = [
|
imports = [
|
||||||
./clan/flake-module.nix
|
./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