mirror of
https://github.com/nix-community/home-manager
synced 2024-11-25 22:20:29 +00:00
docs: NixOS and nix-darwin option documentation
This commit is contained in:
parent
c33b1777b6
commit
5280360d6c
4 changed files with 73 additions and 8 deletions
|
@ -26,27 +26,78 @@ let
|
|||
}];
|
||||
};
|
||||
|
||||
hmModulesDocs = nmd.buildModulesDocs {
|
||||
buildModulesDocs = args:
|
||||
nmd.buildModulesDocs ({
|
||||
moduleRootPaths = [ ./.. ];
|
||||
mkModuleUrl = path:
|
||||
"https://github.com/nix-community/home-manager/blob/master/${path}#blob-path";
|
||||
channelName = "home-manager";
|
||||
} // args);
|
||||
|
||||
hmModulesDocs = buildModulesDocs {
|
||||
modules = import ../modules/modules.nix {
|
||||
inherit lib pkgs;
|
||||
check = false;
|
||||
} ++ [ scrubbedPkgsModule ];
|
||||
moduleRootPaths = [ ./.. ];
|
||||
mkModuleUrl = path:
|
||||
"https://github.com/nix-community/home-manager/blob/master/${path}#blob-path";
|
||||
channelName = "home-manager";
|
||||
docBook.id = "home-manager-options";
|
||||
};
|
||||
|
||||
nixosModuleDocs = buildModulesDocs {
|
||||
modules = let
|
||||
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 = {
|
||||
id = "nixos-options";
|
||||
optionIdPrefix = "nixos-opt";
|
||||
};
|
||||
};
|
||||
|
||||
nixDarwinModuleDocs = buildModulesDocs {
|
||||
modules = let
|
||||
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 = {
|
||||
id = "nix-darwin-options";
|
||||
optionIdPrefix = "nix-darwin-opt";
|
||||
};
|
||||
};
|
||||
|
||||
docs = nmd.buildDocBookDocs {
|
||||
pathName = "home-manager";
|
||||
modulesDocs = [ hmModulesDocs ];
|
||||
modulesDocs = [ hmModulesDocs nixDarwinModuleDocs nixosModuleDocs ];
|
||||
documentsDirectory = ./.;
|
||||
documentType = "book";
|
||||
chunkToc = ''
|
||||
<toc>
|
||||
<d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-home-manager-manual"><?dbhtml filename="index.html"?>
|
||||
<d:tocentry linkend="ch-options"><?dbhtml filename="options.html"?></d:tocentry>
|
||||
<d:tocentry linkend="ch-nixos-options"><?dbhtml filename="nixos-options.html"?></d:tocentry>
|
||||
<d:tocentry linkend="ch-nix-darwin-options"><?dbhtml filename="nix-darwin-options.html"?></d:tocentry>
|
||||
<d:tocentry linkend="ch-tools"><?dbhtml filename="tools.html"?></d:tocentry>
|
||||
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
|
||||
</d:tocentry>
|
||||
|
|
|
@ -38,6 +38,14 @@
|
|||
<title>Configuration Options</title>
|
||||
<xi:include href="./nmd-result/home-manager-options.xml" />
|
||||
</appendix>
|
||||
<appendix xml:id="ch-nixos-options">
|
||||
<title>NixOS Module Options</title>
|
||||
<xi:include href="./nmd-result/nixos-options.xml" />
|
||||
</appendix>
|
||||
<appendix xml:id="ch-nix-darwin-options">
|
||||
<title>nix-darwin Module Options</title>
|
||||
<xi:include href="./nmd-result/nix-darwin-options.xml" />
|
||||
</appendix>
|
||||
<appendix xml:id="ch-tools">
|
||||
<title>Tools</title>
|
||||
<xi:include href="./man-home-manager.xml" />
|
||||
|
|
|
@ -36,7 +36,7 @@ in
|
|||
home-manager = {
|
||||
useUserPackages = mkEnableOption ''
|
||||
installation of user packages through the
|
||||
<option>users.users.‹name?›.packages</option> option.
|
||||
<option>users.users.<name?>.packages</option> option.
|
||||
'';
|
||||
|
||||
useGlobalPkgs = mkEnableOption ''
|
||||
|
@ -60,6 +60,9 @@ in
|
|||
users = mkOption {
|
||||
type = types.attrsOf hmModule;
|
||||
default = {};
|
||||
# Set as not visible to prevent the entire submodule being included in
|
||||
# the documentation.
|
||||
visible = false;
|
||||
description = ''
|
||||
Per-user Home Manager configuration.
|
||||
'';
|
||||
|
|
|
@ -46,7 +46,7 @@ in {
|
|||
home-manager = {
|
||||
useUserPackages = mkEnableOption ''
|
||||
installation of user packages through the
|
||||
<option>users.users.‹name?›.packages</option> option.
|
||||
<option>users.users.<name>.packages</option> option.
|
||||
'';
|
||||
|
||||
useGlobalPkgs = mkEnableOption ''
|
||||
|
@ -70,6 +70,9 @@ in {
|
|||
users = mkOption {
|
||||
type = types.attrsOf hmModule;
|
||||
default = { };
|
||||
# Set as not visible to prevent the entire submodule being included in
|
||||
# the documentation.
|
||||
visible = false;
|
||||
description = ''
|
||||
Per-user Home Manager configuration.
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue