forked from DGNum/liminix
support links from device pages to their installation methods
This commit is contained in:
parent
a9760d239c
commit
5e046490de
4 changed files with 17 additions and 6 deletions
|
@ -5,8 +5,18 @@ let
|
|||
builtins.readDir ../devices;
|
||||
texts = lib.mapAttrsToList (n: t:
|
||||
let d = import ../devices/${n}/default.nix;
|
||||
d' = { description = "no description for ${n}"; } // d;
|
||||
in d'.description )
|
||||
d' = {
|
||||
description = "no description for ${n}";
|
||||
} // d;
|
||||
installer =
|
||||
if d ? installer
|
||||
then ''
|
||||
|
||||
The default installation route for this device is
|
||||
:ref:`system-outputs-${d.installer}`
|
||||
''
|
||||
else "";
|
||||
in (d'.description + installer))
|
||||
devices;
|
||||
in
|
||||
writeText "hwdoc" ''
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
|
||||
(each [_ option (ipairs (yaml.load (io.read "*a")))]
|
||||
(when (. outputs option.name)
|
||||
(print (.. ".. _" option.name) "\n")
|
||||
(print (.. ".. _" (string.gsub option.name "%." "-") ":") "\n")
|
||||
(print option.description)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue