improve doc for outputs and hardware

Changed my mind about "installer" as a first-class concept, at least
in the current implementation. Not every documented output is an
installer
This commit is contained in:
Daniel Barlow
2023-11-12 17:15:58 +00:00
parent 262efaabe6
commit f61e737b54
11 changed files with 133 additions and 45 deletions

View File

@@ -16,7 +16,7 @@ let
:ref:`system-outputs-${d.installer}`
''
else "";
in (d'.description + installer))
in d'.description)
devices;
in
writeText "hwdoc" ''

View File

@@ -12,7 +12,7 @@ Liminix
development
modules
hardware
installers
outputs
Indices and tables

View File

@@ -1,12 +1,12 @@
Outputs
#######
Liminix *outputs* are artefacts that can be installed or run somehow
on a target device, or "installers" which run on a target device
to perform the installation.
Liminix *outputs* are artefacts that can be installed somehow on a
target device, or "installers" which run on the target device to
perform the installation.
There are different outputs because different target devices need
different artefacts or have different ways to get that artefact
different artefacts, or have different ways to get that artefact
installed. The options available for a particular device are described in
the section for that device.

View File

@@ -2,10 +2,18 @@
;; (local { : view } (require :fennel))
(local outputs (collect [k v (ipairs arg)]
(values v true)))
(fn output? [option]
(match option.loc
["system" "outputs" & _] true
_ false))
(each [_ option (ipairs (yaml.load (io.read "*a")))]
(when (. outputs option.name)
(fn sorted-options [options]
(table.sort
options
(fn [a b] (< a.name b.name)))
options)
(each [_ option (ipairs (sorted-options (yaml.load (io.read "*a"))))]
(when (and (output? option) (not option.internal))
(print (.. ".. _" (string.gsub option.name "%." "-") ":") "\n")
(print option.description)))