docs: disable _module.check for nixos/nix-darwin modules
Currently we're maintaining a "mock" module made of sink options, which requires updating whenever the definitions in the nixos/nix-darwin modules change. Instead, set `_module.check` to false so that definitions in those modules are simply ignored.
This commit is contained in:
parent
da55d18ba2
commit
e0baf8ee0c
|
@ -18,6 +18,8 @@ let
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dontCheckDefinitions = { _module.check = false; };
|
||||||
|
|
||||||
buildModulesDocs = args:
|
buildModulesDocs = args:
|
||||||
nmd.buildModulesDocs ({
|
nmd.buildModulesDocs ({
|
||||||
moduleRootPaths = [ ./.. ];
|
moduleRootPaths = [ ./.. ];
|
||||||
|
@ -35,21 +37,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModuleDocs = buildModulesDocs {
|
nixosModuleDocs = buildModulesDocs {
|
||||||
modules = let
|
modules = [ ../nixos scrubbedPkgsModule dontCheckDefinitions ];
|
||||||
nixosModule = module: pkgs.path + "/nixos/modules" + module;
|
|
||||||
mockedNixos = with lib; {
|
|
||||||
options = {
|
|
||||||
environment.pathsToLink = mkSinkUndeclaredOptions { };
|
|
||||||
systemd.services = mkSinkUndeclaredOptions { };
|
|
||||||
users.users = mkSinkUndeclaredOptions { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in [
|
|
||||||
../nixos/default.nix
|
|
||||||
mockedNixos
|
|
||||||
(nixosModule "/misc/assertions.nix")
|
|
||||||
scrubbedPkgsModule
|
|
||||||
];
|
|
||||||
docBook = {
|
docBook = {
|
||||||
id = "nixos-options";
|
id = "nixos-options";
|
||||||
optionIdPrefix = "nixos-opt";
|
optionIdPrefix = "nixos-opt";
|
||||||
|
@ -57,22 +45,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
nixDarwinModuleDocs = buildModulesDocs {
|
nixDarwinModuleDocs = buildModulesDocs {
|
||||||
modules = let
|
modules = [ ../nix-darwin scrubbedPkgsModule dontCheckDefinitions ];
|
||||||
nixosModule = module: pkgs.path + "/nixos/modules" + module;
|
|
||||||
mockedNixDarwin = with lib; {
|
|
||||||
options = {
|
|
||||||
environment.pathsToLink = mkSinkUndeclaredOptions { };
|
|
||||||
system.activationScripts.postActivation.text =
|
|
||||||
mkSinkUndeclaredOptions { };
|
|
||||||
users.users = mkSinkUndeclaredOptions { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in [
|
|
||||||
../nix-darwin/default.nix
|
|
||||||
mockedNixDarwin
|
|
||||||
(nixosModule "/misc/assertions.nix")
|
|
||||||
scrubbedPkgsModule
|
|
||||||
];
|
|
||||||
docBook = {
|
docBook = {
|
||||||
id = "nix-darwin-options";
|
id = "nix-darwin-options";
|
||||||
optionIdPrefix = "nix-darwin-opt";
|
optionIdPrefix = "nix-darwin-opt";
|
||||||
|
|
Loading…
Reference in a new issue