2018-12-18 18:09:56 +01:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
2017-01-15 20:56:18 +01:00
|
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
2018-05-18 23:18:12 +02:00
|
|
|
|
cfg = config.manual;
|
|
|
|
|
|
2023-06-28 23:55:00 +02:00
|
|
|
|
docs = import ../docs {
|
|
|
|
|
inherit pkgs lib;
|
|
|
|
|
inherit (config.home.version) release isReleaseBranch;
|
|
|
|
|
};
|
2018-05-18 23:18:12 +02:00
|
|
|
|
|
2022-06-16 14:13:06 +02:00
|
|
|
|
in {
|
2017-01-15 20:56:18 +01:00
|
|
|
|
options = {
|
2018-05-18 23:18:12 +02:00
|
|
|
|
manual.html.enable = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
2023-07-02 01:45:18 +02:00
|
|
|
|
description = ''
|
2018-05-18 23:18:12 +02:00
|
|
|
|
Whether to install the HTML manual. This also installs the
|
2023-07-01 01:30:13 +02:00
|
|
|
|
{command}`home-manager-help` tool, which opens a local
|
2018-05-18 23:18:12 +02:00
|
|
|
|
copy of the Home Manager manual in the system web browser.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2017-01-15 20:56:18 +01:00
|
|
|
|
manual.manpages.enable = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = true;
|
|
|
|
|
example = false;
|
2023-07-02 01:45:18 +02:00
|
|
|
|
description = ''
|
2017-01-15 20:56:18 +01:00
|
|
|
|
Whether to install the configuration manual page. The manual can
|
2023-07-01 01:30:13 +02:00
|
|
|
|
be reached by {command}`man home-configuration.nix`.
|
|
|
|
|
|
2017-01-15 20:56:18 +01:00
|
|
|
|
When looking at the manual page pretend that all references to
|
|
|
|
|
NixOS stuff are actually references to Home Manager stuff.
|
|
|
|
|
Thanks!
|
|
|
|
|
'';
|
|
|
|
|
};
|
2019-04-13 09:39:14 +02:00
|
|
|
|
|
|
|
|
|
manual.json.enable = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
example = true;
|
2023-07-02 01:45:18 +02:00
|
|
|
|
description = ''
|
2019-04-13 09:39:14 +02:00
|
|
|
|
Whether to install a JSON formatted list of all Home Manager
|
|
|
|
|
options. This can be located at
|
2023-07-01 01:30:13 +02:00
|
|
|
|
{file}`<profile directory>/share/doc/home-manager/options.json`,
|
2019-04-13 09:39:14 +02:00
|
|
|
|
and may be used for navigating definitions, auto-completing,
|
|
|
|
|
and other miscellaneous tasks.
|
|
|
|
|
'';
|
|
|
|
|
};
|
2017-01-15 20:56:18 +01:00
|
|
|
|
};
|
|
|
|
|
|
2018-05-18 23:18:12 +02:00
|
|
|
|
config = {
|
|
|
|
|
home.packages = mkMerge [
|
2018-12-18 18:09:56 +01:00
|
|
|
|
(mkIf cfg.html.enable [ docs.manual.html docs.manual.htmlOpenTool ])
|
|
|
|
|
(mkIf cfg.manpages.enable [ docs.manPages ])
|
|
|
|
|
(mkIf cfg.json.enable [ docs.options.json ])
|
2018-05-18 23:18:12 +02:00
|
|
|
|
];
|
2017-01-15 20:56:18 +01:00
|
|
|
|
};
|
2017-07-21 21:10:32 +02:00
|
|
|
|
|
2017-01-15 20:56:18 +01:00
|
|
|
|
}
|