mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 13:14:15 +03:00
wip: manpage
This commit is contained in:
parent
8594ddfb87
commit
2265af2269
73
docs/man/default.nix
Normal file
73
docs/man/default.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
let
|
||||
|
||||
lib = pkgs.lib;
|
||||
|
||||
nmdSrc = pkgs.fetchFromGitLab {
|
||||
name = "nmd";
|
||||
owner = "rycee";
|
||||
repo = "nmd";
|
||||
rev = "2398aa79ab12aa7aba14bc3b08a6efd38ebabdc5";
|
||||
sha256 = "0yxb48afvccn8vvpkykzcr4q1rgv8jsijqncia7a5ffzshcrwrnh";
|
||||
};
|
||||
|
||||
nmd = import nmdSrc { inherit pkgs; };
|
||||
|
||||
# Make sure the used package is scrubbed to avoid actually instantiating
|
||||
# derivations.
|
||||
#
|
||||
# Also disable checking since we'll be referring to undefined options.
|
||||
setupModule = {
|
||||
imports = [{
|
||||
_module.args = {
|
||||
pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs);
|
||||
};
|
||||
_module.check = false;
|
||||
}];
|
||||
};
|
||||
|
||||
nbModulesDocs = nmd.buildModulesDocs {
|
||||
modules = let
|
||||
nixosModule = module: pkgs.path + "/nixos/modules" + module;
|
||||
in [
|
||||
../../modules/bitcoind.nix
|
||||
(nixosModule "/misc/assertions.nix")
|
||||
setupModule
|
||||
];
|
||||
moduleRootPaths = [ ../modules ];
|
||||
mkModuleUrl = path:
|
||||
"https://github.com/fort-nix/nix-bitcoin/blob/master/${path}#blob-path";
|
||||
channelName = "nix-bitcoin";
|
||||
docBook.id = "nb-options";
|
||||
};
|
||||
|
||||
docs = nmd.buildDocBookDocs {
|
||||
pathName = "nix-bitcoin";
|
||||
modulesDocs = [ nbModulesDocs ];
|
||||
documentsDirectory = ./.;
|
||||
chunkToc = ''
|
||||
<toc>
|
||||
<d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-nix-bitcoin-manual"><?dbhtml filename="index.html"?>
|
||||
<d:tocentry linkend="ch-nb-options"><?dbhtml filename="nb-options.html"?></d:tocentry>
|
||||
</d:tocentry>
|
||||
</toc>
|
||||
'';
|
||||
};
|
||||
|
||||
in {
|
||||
options = {
|
||||
json = pkgs.symlinkJoin {
|
||||
name = "nix-bitcoin-options-json";
|
||||
paths = [
|
||||
(nbModulesDocs.json.override {
|
||||
path = "share/doc/nix-bitcoin/nb-options.json";
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
manPages = docs.manPages;
|
||||
|
||||
manual = { inherit (docs) html htmlOpenTool; };
|
||||
}
|
27
docs/man/man-nb-options.xml
Normal file
27
docs/man/man-nb-options.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refmeta>
|
||||
<refentrytitle><filename>nb-options</filename>
|
||||
</refentrytitle><manvolnum>5</manvolnum>
|
||||
<refmiscinfo class="source">nix-bitcoin</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname><filename>nb-options</filename>
|
||||
</refname><refpurpose>nix-bitcoin configuration specification</refpurpose>
|
||||
</refnamediv>
|
||||
<refsection>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
This contains the nix-bitcoin module options.
|
||||
</para>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<title>Options</title>
|
||||
<para>
|
||||
You can use the following options in <filename>configuration.nix</filename>:
|
||||
</para>
|
||||
<xi:include href="./nmd-result/nb-options.xml" />
|
||||
</refsection>
|
||||
</refentry>
|
||||
|
13
docs/man/man-pages.xml
Normal file
13
docs/man/man-pages.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<reference xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>nix-bitcoin Reference Pages</title>
|
||||
<info>
|
||||
<author><personname>nix-bitcoin developers</personname>
|
||||
</author>
|
||||
<copyright><year>2021</year><holder>nix-bitcoin developers</holder>
|
||||
</copyright>
|
||||
</info>
|
||||
<xi:include href="man-nb-options.xml" />
|
||||
</reference>
|
||||
|
32
docs/man/manual.xml
Normal file
32
docs/man/manual.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="book-nix-bitcoin-manual">
|
||||
<info>
|
||||
<title>nix-bitcoin</title>
|
||||
</info>
|
||||
<preface>
|
||||
<title>Preface</title>
|
||||
<para>
|
||||
Documentation of nix-bitcoin options.
|
||||
</para>
|
||||
<para>
|
||||
If you encounter problems or bugs then please report them on the <link xlink:href="https://gitlab.com/rycee/nur-expressions/issues">issue tracker</link>.
|
||||
</para>
|
||||
</preface>
|
||||
<appendix xml:id="ch-nb-options">
|
||||
<title>nix-bitcoin configuration options</title>
|
||||
<section xml:id="sec-nb-usage">
|
||||
<title>Usage</title>
|
||||
<para>
|
||||
To use these options modify your <filename>configuration.nix</filename> such that it has the format
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="sec-nb-options">
|
||||
<title>Options</title>
|
||||
|
||||
<xi:include href="./nmd-result/nb-options.xml" />
|
||||
</section>
|
||||
</appendix>
|
||||
</book>
|
Loading…
Reference in New Issue
Block a user