diff --git a/nixos/doc/manual/Makefile b/nixos/doc/manual/Makefile
new file mode 100644
index 00000000000..b15fbaa270f
--- /dev/null
+++ b/nixos/doc/manual/Makefile
@@ -0,0 +1,8 @@
+debug:
+ nix-shell --packages xmloscopy \
+ --run 'xmloscopy --docbook5 ./manual.xml ./manual-combined.xml'
+
+generated: ./options-to-docbook.xsl
+ nix-build ../../release.nix \
+ --attr manualGeneratedSources.x86_64-linux \
+ --out-link ./generated
diff --git a/nixos/doc/manual/configuration/configuration.xml b/nixos/doc/manual/configuration/configuration.xml
index 8677c13db40..f092c7e207f 100644
--- a/nixos/doc/manual/configuration/configuration.xml
+++ b/nixos/doc/manual/configuration/configuration.xml
@@ -25,9 +25,8 @@ effect after you run nixos-rebuild.
-
+
-
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index ac22712baf8..2c6309474b3 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -102,13 +102,18 @@ let
'';
+ generatedSources = runCommand "generated-docbook" {} ''
+ mkdir $out
+ ln -s ${modulesDoc} $out/modules.xml
+ ln -s ${optionsDocBook} $out/options-db.xml
+ printf "%s" "${version}" > $out/version
+ '';
+
copySources =
''
cp -prd $sources/* . # */
+ ln -s ${generatedSources} ./generated
chmod -R u+w .
- ln -s ${modulesDoc} configuration/modules.xml
- ln -s ${optionsDocBook} options-db.xml
- printf "%s" "${version}" > version
'';
toc = builtins.toFile "toc.xml"
@@ -224,6 +229,7 @@ let
'';
in rec {
+ inherit generatedSources;
# The NixOS options in JSON format.
optionsJSON = runCommand "options-json"
diff --git a/nixos/doc/manual/development/writing-documentation.xml b/nixos/doc/manual/development/writing-documentation.xml
index 59a287717ac..8b787fae1fe 100644
--- a/nixos/doc/manual/development/writing-documentation.xml
+++ b/nixos/doc/manual/development/writing-documentation.xml
@@ -18,13 +18,25 @@
The DocBook sources of the are in the
nixos/doc/manual
- subdirectory of the Nixpkgs repository. If you make modifications to
- the manual, it's important to build it before committing. You can do
- that as follows:
-
- nix-build nixos/release.nix -A manual.x86_64-linux
+ subdirectory of the Nixpkgs repository.
+
+ You can quickly validate your edits with make:
+
+
+
+ $ cd /path/to/nixpkgs/nixos/doc/manual
+ $ make
+
+
+
+ Once you are done making modifications to the manual, it's important
+ to build it before committing. You can do that as follows:
+
+
+nix-build nixos/release.nix -A manual.x86_64-linux
+
When this command successfully finishes, it will tell you where the
manual got generated. The HTML will be accessible through the
diff --git a/nixos/doc/manual/man-configuration.xml b/nixos/doc/manual/man-configuration.xml
index 05531b3909a..37ffb9d648a 100644
--- a/nixos/doc/manual/man-configuration.xml
+++ b/nixos/doc/manual/man-configuration.xml
@@ -31,7 +31,8 @@ therein.
You can use the following options in
configuration.nix.
-
+
diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml
index 9aa332f026d..676924e5c8b 100644
--- a/nixos/doc/manual/manual.xml
+++ b/nixos/doc/manual/manual.xml
@@ -6,7 +6,7 @@
NixOS Manual
- Version
+ Version
@@ -39,7 +39,8 @@
Configuration Options
-
+
diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl
index 7b45b233ab2..43a69806a2b 100644
--- a/nixos/doc/manual/options-to-docbook.xsl
+++ b/nixos/doc/manual/options-to-docbook.xsl
@@ -15,9 +15,9 @@
-
-
-
+
+ Configuration Options
+
@@ -100,7 +100,7 @@
-
+
diff --git a/nixos/release.nix b/nixos/release.nix
index 2f779280e6b..4994cd98302 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -124,7 +124,6 @@ let
preferLocalBuild = true;
};
-
in rec {
channel = import lib/make-channel.nix { inherit pkgs nixpkgs version versionSuffix; };
@@ -132,6 +131,7 @@ in rec {
manual = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manual);
manualEpub = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualEpub));
manpages = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manpages);
+ manualGeneratedSources = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.generatedSources);
options = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;