diff --git a/flake.nix b/flake.nix index 0ab785f..37e00c6 100644 --- a/flake.nix +++ b/flake.nix @@ -33,12 +33,24 @@ # Full user manual manual = let + suppressModuleArgsDocs = { lib, ... }: { + options = { + _module.args = lib.mkOption { + internal = true; + }; + }; + }; colmena = self.packages.${system}.colmena; deploymentOptionsMd = (pkgs.nixosOptionsDoc { - options = evalNix.docs.deploymentOptions pkgs; + inherit (pkgs.lib.evalModules { + modules = [ colmenaOptions.deploymentOptions suppressModuleArgsDocs]; + specialArgs = { name = "nixos"; nodes = {}; }; + }) options; }).optionsCommonMark; metaOptionsMd = (pkgs.nixosOptionsDoc { - options = evalNix.docs.metaOptions pkgs; + inherit (pkgs.lib.evalModules { + modules = [ colmenaOptions.metaOptions suppressModuleArgsDocs]; + }) options; }).optionsCommonMark; in pkgs.callPackage ./manual { inherit colmena deploymentOptionsMd metaOptionsMd; diff --git a/src/nix/hive/eval.nix b/src/nix/hive/eval.nix index a0e489f..d859c79 100644 --- a/src/nix/hive/eval.nix +++ b/src/nix/hive/eval.nix @@ -195,14 +195,6 @@ let nodes = uncheckedNodes; }; - suppressModuleArgsDocs = { lib, ... }: { - options = { - _module.args = lib.mkOption { - internal = true; - }; - }; - }; - # Add required config Key here since we don't want to eval nixpkgs metaConfigKeys = [ "name" "description" @@ -221,22 +213,4 @@ in { meta = hive.meta; nixosModules = { inherit (colmenaOptions) deploymentOptions; }; - - docs = { - deploymentOptions = pkgs: let - eval = pkgs.lib.evalModules { - modules = [ colmenaOptions.deploymentOptions suppressModuleArgsDocs ]; - specialArgs = { - name = "nixos"; - nodes = {}; - }; - }; - in eval.options; - - metaOptions = pkgs: let - eval = pkgs.lib.evalModules { - modules = [ colmenaOptions.metaOptions suppressModuleArgsDocs ]; - }; - in eval.options; - }; }