mirror of
https://github.com/nix-community/home-manager
synced 2024-12-21 09:19:47 +01: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:
|
||||||
modules = import ../modules/modules.nix {
|
nmd.buildModulesDocs ({
|
||||||
inherit lib pkgs;
|
|
||||||
check = false;
|
|
||||||
} ++ [ scrubbedPkgsModule ];
|
|
||||||
moduleRootPaths = [ ./.. ];
|
moduleRootPaths = [ ./.. ];
|
||||||
mkModuleUrl = path:
|
mkModuleUrl = path:
|
||||||
"https://github.com/nix-community/home-manager/blob/master/${path}#blob-path";
|
"https://github.com/nix-community/home-manager/blob/master/${path}#blob-path";
|
||||||
channelName = "home-manager";
|
channelName = "home-manager";
|
||||||
|
} // args);
|
||||||
|
|
||||||
|
hmModulesDocs = buildModulesDocs {
|
||||||
|
modules = import ../modules/modules.nix {
|
||||||
|
inherit lib pkgs;
|
||||||
|
check = false;
|
||||||
|
} ++ [ scrubbedPkgsModule ];
|
||||||
docBook.id = "home-manager-options";
|
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 {
|
docs = nmd.buildDocBookDocs {
|
||||||
pathName = "home-manager";
|
pathName = "home-manager";
|
||||||
modulesDocs = [ hmModulesDocs ];
|
modulesDocs = [ hmModulesDocs nixDarwinModuleDocs nixosModuleDocs ];
|
||||||
documentsDirectory = ./.;
|
documentsDirectory = ./.;
|
||||||
documentType = "book";
|
documentType = "book";
|
||||||
chunkToc = ''
|
chunkToc = ''
|
||||||
<toc>
|
<toc>
|
||||||
<d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-home-manager-manual"><?dbhtml filename="index.html"?>
|
<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-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-tools"><?dbhtml filename="tools.html"?></d:tocentry>
|
||||||
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
|
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
|
||||||
</d:tocentry>
|
</d:tocentry>
|
||||||
|
|
|
@ -38,6 +38,14 @@
|
||||||
<title>Configuration Options</title>
|
<title>Configuration Options</title>
|
||||||
<xi:include href="./nmd-result/home-manager-options.xml" />
|
<xi:include href="./nmd-result/home-manager-options.xml" />
|
||||||
</appendix>
|
</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">
|
<appendix xml:id="ch-tools">
|
||||||
<title>Tools</title>
|
<title>Tools</title>
|
||||||
<xi:include href="./man-home-manager.xml" />
|
<xi:include href="./man-home-manager.xml" />
|
||||||
|
|
|
@ -36,7 +36,7 @@ in
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = mkEnableOption ''
|
useUserPackages = mkEnableOption ''
|
||||||
installation of user packages through the
|
installation of user packages through the
|
||||||
<option>users.users.‹name?›.packages</option> option.
|
<option>users.users.<name?>.packages</option> option.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
useGlobalPkgs = mkEnableOption ''
|
useGlobalPkgs = mkEnableOption ''
|
||||||
|
@ -60,6 +60,9 @@ in
|
||||||
users = mkOption {
|
users = mkOption {
|
||||||
type = types.attrsOf hmModule;
|
type = types.attrsOf hmModule;
|
||||||
default = {};
|
default = {};
|
||||||
|
# Set as not visible to prevent the entire submodule being included in
|
||||||
|
# the documentation.
|
||||||
|
visible = false;
|
||||||
description = ''
|
description = ''
|
||||||
Per-user Home Manager configuration.
|
Per-user Home Manager configuration.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -46,7 +46,7 @@ in {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = mkEnableOption ''
|
useUserPackages = mkEnableOption ''
|
||||||
installation of user packages through the
|
installation of user packages through the
|
||||||
<option>users.users.‹name?›.packages</option> option.
|
<option>users.users.<name>.packages</option> option.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
useGlobalPkgs = mkEnableOption ''
|
useGlobalPkgs = mkEnableOption ''
|
||||||
|
@ -70,6 +70,9 @@ in {
|
||||||
users = mkOption {
|
users = mkOption {
|
||||||
type = types.attrsOf hmModule;
|
type = types.attrsOf hmModule;
|
||||||
default = { };
|
default = { };
|
||||||
|
# Set as not visible to prevent the entire submodule being included in
|
||||||
|
# the documentation.
|
||||||
|
visible = false;
|
||||||
description = ''
|
description = ''
|
||||||
Per-user Home Manager configuration.
|
Per-user Home Manager configuration.
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue