diff --git a/doc/default.nix b/doc/default.nix index 8b995c5a6..f55163d8a 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -59,7 +59,7 @@ let # # E.g. if some `options` came from modules in ${pkgs.customModules}/nix, # you'd need to include `extraSources = [ pkgs.customModules ]` - prefixesToStrip = map (p: "${toString p}/") ([ ../../.. ] ++ extraSources); + prefixesToStrip = map (p: "${toString p}/") ([ ./.. ] ++ extraSources); stripAnyPrefixes = lib.flip (lib.fold lib.removePrefix) prefixesToStrip; # Custom "less" that pushes up all the things ending in ".enable*" @@ -78,19 +78,17 @@ let # Convert the list of options into an XML file. optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList); - optionsDocBook = runCommand "options-db.xml" {} '' - optionsXML=${optionsXML} - if grep /home--manager/modules $optionsXML; then - echo "The manual appears to depend on the location of Home Manager, which is bad" - echo "since this prevents sharing via the NixOS channel. This is typically" - echo "caused by an option default that refers to a relative path (see above" - echo "for hints about the offending path)." - exit 1 - fi - ${buildPackages.libxslt.bin}/bin/xsltproc \ - --stringparam revision '${revision}' \ - -o $out ${} $optionsXML - ''; + optionsDocBook = runCommand "options-db.xml" + { + nativeBuildInputs = [ buildPackages.libxslt.bin ]; + } + '' + optionsXML=${optionsXML} + xsltproc \ + --stringparam program 'home-manager' \ + --stringparam revision '${revision}' \ + -o $out ${./options-to-docbook.xsl} $optionsXML + ''; sources = lib.sourceFilesBySuffices ./. [".xml"]; @@ -268,8 +266,8 @@ in rec { mkdir -p $dst/images/callouts cp ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.svg $dst/images/callouts/ - cp ${../../../doc/style.css} $dst/style.css - cp ${../../../doc/overrides.css} $dst/overrides.css + cp ${./style.css} $dst/style.css + cp ${./overrides.css} $dst/overrides.css cp -r ${pkgs.documentation-highlighter} $dst/highlightjs mkdir -p $out/nix-support diff --git a/doc/manual.xml b/doc/manual.xml index 999876360..f076f8338 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -2,27 +2,19 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0" - xml:id="book-nixos-manual"> + xml:id="book-home-manager-manual"> Home Manager Manual Preface - This manual will eventually describes how to install, use and + This manual will eventually describes how to install, use, and extend Home Manager. - If you encounter problems, please report them on the - nix-devel - mailing list or on the - #nixos channel on Freenode. Bugs should be - reported in - NixOS’ - GitHub issue tracker. + If you encounter problems or bugs then please report them on the + Home Manager issue tracker. @@ -34,7 +26,6 @@ Configuration Options - + diff --git a/doc/options-to-docbook.xsl b/doc/options-to-docbook.xsl new file mode 100644 index 000000000..0fef4e1df --- /dev/null +++ b/doc/options-to-docbook.xsl @@ -0,0 +1,239 @@ + + + + + + + + + + + + + Configuration Options + + + + + + + + + + + + + + + + + + Type: + + + + + (read only) + + + + + + + Default: + + + + + + + + Example: + + + + + + + + + + + + + + + Related packages: + + + + + + + + Declared by: + + + + + + + Defined by: + + + + + + + + + + + + + + + + + + + +'' +'' + + + + + + + + + + null + + + + + + + '''' + + + "" + + + + + + + + + + + + true + + + + + false + + + + + [ + + + + + ] + + + + + + + + + + { + + + = + ; + + } + + + + + (build of ) + + + + + + + + + + + + https://github.com/rycee/home-manager/blob//#blob-path + + + https://github.com/NixOS/nixpkgs/blob/master/ + + + https://github.com/NixOS/nixpkgs/blob// + + + + + https://github.com/NixOS/nixops/blob//nix/ + + + file:// + + + + + + <home-manager/> + + + <nixpkgs/> + + + <nixops/> + + + + + + + + + + + + + λ + + + + diff --git a/doc/overrides.css b/doc/overrides.css new file mode 100644 index 000000000..4c7d4a31b --- /dev/null +++ b/doc/overrides.css @@ -0,0 +1,9 @@ +.docbook .xref img[src^=images\/callouts\/], +.screen img, +.programlisting img { + width: 1em; +} + +.calloutlist img { + width: 1.5em; +} diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 000000000..0db907815 --- /dev/null +++ b/doc/style.css @@ -0,0 +1,271 @@ +/* Copied from http://bakefile.sourceforge.net/, which appears + licensed under the GNU GPL. */ + + +/*************************************************************************** + Basic headers and text: + ***************************************************************************/ + +body +{ + font-family: "Nimbus Sans L", sans-serif; + background: white; + margin: 2em 1em 2em 1em; +} + +h1, h2, h3, h4 +{ + color: #005aa0; +} + +h1 /* title */ +{ + font-size: 200%; +} + +h2 /* chapters, appendices, subtitle */ +{ + font-size: 180%; +} + +/* Extra space between chapters, appendices. */ +div.chapter > div.titlepage h2, div.appendix > div.titlepage h2 +{ + margin-top: 1.5em; +} + +div.section > div.titlepage h2 /* sections */ +{ + font-size: 150%; + margin-top: 1.5em; +} + +h3 /* subsections */ +{ + font-size: 125%; +} + +div.simplesect h2 +{ + font-size: 110%; +} + +div.appendix h3 +{ + font-size: 150%; + margin-top: 1.5em; +} + +div.refnamediv h2, div.refsynopsisdiv h2, div.refsection h2 /* refentry parts */ +{ + margin-top: 1.4em; + font-size: 125%; +} + +div.refsection h3 +{ + font-size: 110%; +} + + +/*************************************************************************** + Examples: + ***************************************************************************/ + +div.example +{ + border: 1px solid #b0b0b0; + padding: 6px 6px; + margin-left: 1.5em; + margin-right: 1.5em; + background: #f4f4f8; + border-radius: 0.4em; + box-shadow: 0.4em 0.4em 0.5em #e0e0e0; +} + +div.example p.title +{ + margin-top: 0em; +} + +div.example pre +{ + box-shadow: none; +} + + +/*************************************************************************** + Screen dumps: + ***************************************************************************/ + +pre.screen, pre.programlisting +{ + border: 1px solid #b0b0b0; + padding: 3px 3px; + margin-left: 1.5em; + margin-right: 1.5em; + + background: #f4f4f8; + font-family: monospace; + border-radius: 0.4em; + box-shadow: 0.4em 0.4em 0.5em #e0e0e0; +} + +div.example pre.programlisting +{ + border: 0px; + padding: 0 0; + margin: 0 0 0 0; +} + +/*************************************************************************** + Notes, warnings etc: + ***************************************************************************/ + +.note, .warning +{ + border: 1px solid #b0b0b0; + padding: 3px 3px; + margin-left: 1.5em; + margin-right: 1.5em; + margin-bottom: 1em; + padding: 0.3em 0.3em 0.3em 0.3em; + background: #fffff5; + border-radius: 0.4em; + box-shadow: 0.4em 0.4em 0.5em #e0e0e0; +} + +div.note, div.warning +{ + font-style: italic; +} + +div.note h3, div.warning h3 +{ + color: red; + font-size: 100%; + padding-right: 0.5em; + display: inline; +} + +div.note p, div.warning p +{ + margin-bottom: 0em; +} + +div.note h3 + p, div.warning h3 + p +{ + display: inline; +} + +div.note h3 +{ + color: blue; + font-size: 100%; +} + +div.navfooter * +{ + font-size: 90%; +} + + +/*************************************************************************** + Links colors and highlighting: + ***************************************************************************/ + +a { text-decoration: none; } +a:hover { text-decoration: underline; } +a:link { color: #0048b3; } +a:visited { color: #002a6a; } + + +/*************************************************************************** + Table of contents: + ***************************************************************************/ + +div.toc +{ + font-size: 90%; +} + +div.toc dl +{ + margin-top: 0em; + margin-bottom: 0em; +} + + +/*************************************************************************** + Special elements: + ***************************************************************************/ + +tt, code +{ + color: #400000; +} + +.term +{ + font-weight: bold; + +} + +div.variablelist dd p, div.glosslist dd p +{ + margin-top: 0em; +} + +div.variablelist dd, div.glosslist dd +{ + margin-left: 1.5em; +} + +div.glosslist dt +{ + font-style: italic; +} + +.varname +{ + color: #400000; +} + +span.command strong +{ + font-weight: normal; + color: #400000; +} + +div.calloutlist table +{ + box-shadow: none; +} + +table +{ + border-collapse: collapse; + box-shadow: 0.4em 0.4em 0.5em #e0e0e0; +} + +table.simplelist +{ + text-align: left; + color: #005aa0; + border: 0; + padding: 5px; + background: #fffff5; + font-weight: normal; + font-style: italic; + box-shadow: none; + margin-bottom: 1em; +} + +div.navheader table, div.navfooter table { + box-shadow: none; +} + +div.affiliation +{ + font-style: italic; +} diff --git a/modules/manual.nix b/modules/manual.nix index ae0ff1d95..b603dac8a 100644 --- a/modules/manual.nix +++ b/modules/manual.nix @@ -12,7 +12,7 @@ let homeManagerManual = import ../doc { inherit pkgs config; version = "0.1"; - revision = "release-0.1"; + revision = "master"; options = let scrubbedEval = evalModules {