-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8594ddf
commit 74e0ac1
Showing
4 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/backups.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; }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |