-
Notifications
You must be signed in to change notification settings - Fork 26
/
manual.nix
47 lines (44 loc) · 1.24 KB
/
manual.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.manual;
manual = import ../../manual { inherit pkgs; };
in {
options = {
manual.html.enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to install the HTML manual.
'';
};
manual.manpages.enable = mkOption {
type = types.bool;
default = true;
example = false;
description = ''
Whether to install the configuration manual page. The manual can
be reached by <command>man configuration.nix</command>.
'';
};
manual.json.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Whether to install a JSON formatted list of all vpsAdminOS
options. This can be located at
<filename><profile directory>/share/doc/vpsadminos/options.json</filename>,
and may be used for navigating definitions, auto-completing,
and other miscellaneous tasks.
'';
};
};
config = {
environment.systemPackages = mkMerge [
(mkIf cfg.html.enable [ manual.html ])
(mkIf cfg.manpages.enable [ manual.manPages ])
(mkIf cfg.json.enable [ manual.options.json ])
];
};
}