From 0a70ea5e69f4027fba3016ca42e184f4062eace8 Mon Sep 17 00:00:00 2001 From: pennae Date: Mon, 2 Jan 2023 21:43:06 +0100 Subject: [PATCH] nixos/digitalbitbox: convert manual chapter to MD --- .../programs/digitalbitbox/default.nix | 2 + nixos/modules/programs/digitalbitbox/doc.md | 47 ++++++++ nixos/modules/programs/digitalbitbox/doc.xml | 110 +++++++++--------- 3 files changed, 101 insertions(+), 58 deletions(-) create mode 100644 nixos/modules/programs/digitalbitbox/doc.md diff --git a/nixos/modules/programs/digitalbitbox/default.nix b/nixos/modules/programs/digitalbitbox/default.nix index 101ee8ddbafc..38420df3d9e1 100644 --- a/nixos/modules/programs/digitalbitbox/default.nix +++ b/nixos/modules/programs/digitalbitbox/default.nix @@ -33,6 +33,8 @@ in }; meta = { + # Don't edit the docbook xml directly, edit the md and generate it: + # `pandoc doc.md -t docbook --top-level-division=chapter --extract-media=media -f markdown-smart > doc.xml` doc = ./doc.xml; maintainers = with lib.maintainers; [ vidbina ]; }; diff --git a/nixos/modules/programs/digitalbitbox/doc.md b/nixos/modules/programs/digitalbitbox/doc.md new file mode 100644 index 000000000000..9bca14e97ffe --- /dev/null +++ b/nixos/modules/programs/digitalbitbox/doc.md @@ -0,0 +1,47 @@ +# Digital Bitbox {#module-programs-digitalbitbox} + +Digital Bitbox is a hardware wallet and second-factor authenticator. + +The `digitalbitbox` programs module may be installed by setting +`programs.digitalbitbox` to `true` in a manner similar to +``` +programs.digitalbitbox.enable = true; +``` +and bundles the `digitalbitbox` package (see [](#sec-digitalbitbox-package)), +which contains the `dbb-app` and `dbb-cli` binaries, along with the hardware +module (see [](#sec-digitalbitbox-hardware-module)) which sets up the necessary +udev rules to access the device. + +Enabling the digitalbitbox module is pretty much the easiest way to get a +Digital Bitbox device working on your system. + +For more information, see . + +## Package {#sec-digitalbitbox-package} + +The binaries, `dbb-app` (a GUI tool) and `dbb-cli` (a CLI tool), are available +through the `digitalbitbox` package which could be installed as follows: +``` +environment.systemPackages = [ + pkgs.digitalbitbox +]; +``` + +## Hardware {#sec-digitalbitbox-hardware-module} + +The digitalbitbox hardware package enables the udev rules for Digital Bitbox +devices and may be installed as follows: +``` +hardware.digitalbitbox.enable = true; +``` + +In order to alter the udev rules, one may provide different values for the +`udevRule51` and `udevRule52` attributes by means of overriding as follows: +``` +programs.digitalbitbox = { + enable = true; + package = pkgs.digitalbitbox.override { + udevRule51 = "something else"; + }; +}; +``` diff --git a/nixos/modules/programs/digitalbitbox/doc.xml b/nixos/modules/programs/digitalbitbox/doc.xml index e4ac6195dae6..301506405047 100644 --- a/nixos/modules/programs/digitalbitbox/doc.xml +++ b/nixos/modules/programs/digitalbitbox/doc.xml @@ -1,74 +1,68 @@ - - Digital Bitbox - - Digital Bitbox is a hardware wallet and second-factor authenticator. - - - The digitalbitbox programs module may be installed by - setting programs.digitalbitbox to true - in a manner similar to - + + Digital Bitbox + + Digital Bitbox is a hardware wallet and second-factor authenticator. + + + The digitalbitbox programs module may be + installed by setting programs.digitalbitbox to + true in a manner similar to + + programs.digitalbitbox.enable = true; - and bundles the digitalbitbox package (see - ), which contains the - dbb-app and dbb-cli binaries, along - with the hardware module (see - ) which sets up the - necessary udev rules to access the device. - - - Enabling the digitalbitbox module is pretty much the easiest way to get a - Digital Bitbox device working on your system. - - - For more information, see - . - -
- Package - - The binaries, dbb-app (a GUI tool) and - dbb-cli (a CLI tool), are available through the - digitalbitbox package which could be installed as - follows: - + and bundles the digitalbitbox package (see + ), which contains + the dbb-app and dbb-cli + binaries, along with the hardware module (see + ) which + sets up the necessary udev rules to access the device. + + + Enabling the digitalbitbox module is pretty much the easiest way to + get a Digital Bitbox device working on your system. + + + For more information, see + https://digitalbitbox.com/start_linux. + +
+ Package + + The binaries, dbb-app (a GUI tool) and + dbb-cli (a CLI tool), are available through the + digitalbitbox package which could be installed + as follows: + + environment.systemPackages = [ pkgs.digitalbitbox ]; - -
-
- Hardware - - - The digitalbitbox hardware package enables the udev rules for Digital Bitbox - devices and may be installed as follows: - +
+
+ Hardware + + The digitalbitbox hardware package enables the udev rules for + Digital Bitbox devices and may be installed as follows: + + hardware.digitalbitbox.enable = true; - - - - In order to alter the udev rules, one may provide different values for the - udevRule51 and udevRule52 attributes - by means of overriding as follows: - + + In order to alter the udev rules, one may provide different values + for the udevRule51 and + udevRule52 attributes by means of overriding as + follows: + + programs.digitalbitbox = { enable = true; package = pkgs.digitalbitbox.override { - udevRule51 = "something else"; + udevRule51 = "something else"; }; }; - -
+