summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2018-09-06 19:17:44 +0000
committerJan Malakhovski <oxij@oxij.org>2018-09-23 20:47:58 +0000
commitfe744d3fb1d61e6f7f7c2f40217364f9577390ca (patch)
tree522c9fc8d568e238399b376f00e74dbc4056b4a4 /nixos
parent56853dc6d83a861050bbc02041dbe65f7b1b6f63 (diff)
nixos: doc: rename `manual` to `manualHTML`, cleanup references
Because when I see "config.system.build.manual.manual" after I forgot what it means I ask "Why do I need that second `.manual` there again?". Doesn't happen with `config.system.build.manual.manualHTML`.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/default.nix7
-rw-r--r--nixos/doc/manual/development/building-parts.xml2
-rw-r--r--nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix2
-rw-r--r--nixos/modules/services/misc/nixos-manual.nix8
-rw-r--r--nixos/release.nix3
5 files changed, 13 insertions, 9 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index aaa6e0da545f..faae4f205443 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -252,7 +252,7 @@ in rec {
''; # */
# Generate the NixOS manual.
- manual = runCommand "nixos-manual"
+ manualHTML = runCommand "nixos-manual-html"
{ inherit sources;
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
meta.description = "The NixOS manual in HTML format";
@@ -281,6 +281,11 @@ in rec {
echo "doc manual $dst" >> $out/nix-support/hydra-build-products
''; # */
+ # Alias for backward compatibility. TODO(@oxij): remove eventually.
+ manual = manualHTML;
+
+ # Index page of the NixOS manual.
+ manualHTMLIndex = "${manualHTML}/share/doc/nixos/index.html";
manualEpub = runCommand "nixos-manual-epub"
{ inherit sources;
diff --git a/nixos/doc/manual/development/building-parts.xml b/nixos/doc/manual/development/building-parts.xml
index eaffc0ef47c2..b4791b72970f 100644
--- a/nixos/doc/manual/development/building-parts.xml
+++ b/nixos/doc/manual/development/building-parts.xml
@@ -34,7 +34,7 @@ $ nix-build -A system</screen>
</varlistentry>
<varlistentry>
<term>
- <varname>system.build.manual.manual</varname>
+ <varname>system.build.manual.manualHTML</varname>
</term>
<listitem>
<para>
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
index f71ed46c7e9e..1c3c9cb30b41 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
@@ -30,7 +30,7 @@ with lib;
Version=1.0
Type=Application
Name=NixOS Manual
- Exec=firefox ${config.system.build.manual.manual}/share/doc/nixos/index.html
+ Exec=firefox ${config.system.build.manual.manualHTMLIndex}
Icon=text-html
'';
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index 993b59590bb0..37705e2a889c 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -39,8 +39,6 @@ let
in scrubbedEval.options;
};
- entry = "${manual.manual}/share/doc/nixos/index.html";
-
helpScript = pkgs.writeScriptBin "nixos-help"
''
#! ${pkgs.runtimeShell} -e
@@ -61,7 +59,7 @@ let
fi
fi
fi
- exec "$browser" ${entry}
+ exec "$browser" ${manual.manualHTMLIndex}
'';
desktopItem = pkgs.makeDesktopItem {
@@ -121,7 +119,7 @@ in
environment.systemPackages = []
++ optionals config.services.xserver.enable [ desktopItem pkgs.nixos-icons ]
++ optional config.documentation.man.enable manual.manpages
- ++ optionals config.documentation.doc.enable [ manual.manual helpScript ];
+ ++ optionals config.documentation.doc.enable [ manual.manualHTML helpScript ];
boot.extraTTYs = mkIf cfg.showManual ["tty${toString cfg.ttyNumber}"];
@@ -130,7 +128,7 @@ in
{ description = "NixOS Manual";
wantedBy = [ "multi-user.target" ];
serviceConfig =
- { ExecStart = "${cfg.browser} ${entry}";
+ { ExecStart = "${cfg.browser} ${manual.manualHTMLIndex}";
StandardInput = "tty";
StandardOutput = "tty";
TTYPath = "/dev/tty${toString cfg.ttyNumber}";
diff --git a/nixos/release.nix b/nixos/release.nix
index 14983edb0ce7..cce2c54f02bf 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -128,7 +128,8 @@ in rec {
channel = import lib/make-channel.nix { inherit pkgs nixpkgs version versionSuffix; };
- manual = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manual);
+ manualHTML = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualHTML);
+ manual = manualHTML; # TODO(@oxij): remove eventually
manualEpub = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualEpub));
manpages = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manpages);
manualGeneratedSources = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.generatedSources);