Next: (heks-linux lambdock), Previous: (heks-linux gtk), Up: API
The desktop as a bootable image: an openSUSE Slowroll live ISO carrying this configuration, the editor’s and the shell’s.
The image is a KIWI description, and a KIWI description is four things:
an XML file that names the distribution, its repositories and its
packages; a config.sh that runs inside the chroot while the image is
built; an images.sh that names the file the build produces; and a root/
directory whose contents are copied onto the image’s filesystem. Three
of those four are data, so they are written here in Scheme, the way
every other surface of this desktop is: the package list comes from
(heks-linux packages zypper), the locale, timezone and hostname
come from the same settings a session reads, and the shell scripts are
format strings that a test can look inside.
The ISO is a *live* image: it boots the desktop from a squashfs with a writable overlay, so it asks nothing of the machine it starts on. It is hybrid-persistent, which means the same file can go on a USB stick and keep what a session did with it.
What the image does not carry is the Guix store the renderers run from - it is the size of a small distribution, and building it into the image on the day it is built is the next step rather than this one. The ISO therefore ships the three checkouts and the editor’s configuration already in place, and a first-boot unit that runs the three commands the README documents to render the rest. That unit needs the network, which is the one thing a live image cannot promise.
Default value:
(("heks-linux" . "trunk") ("heks-emacs" . "trunk") ("heks-bash" . "trunk"))
Default value:
"config.sh"
Default value:
"dist/image"
Default value:
"config.xml"
Default value:
"images.sh"
Default value:
"root/usr/local/lib/heks-linux"
Default value:
"heks-render"
Default value:
"/var/lib/heks-linux"
Default value:
"heks-render.service"
Default value:
#t
Default value:
"https://codeberg.org/jjba23"
Default value:
"heks"
Default value:
"0.1.0"
Return config.sh: the whole build, in the order it happens.
Each phase is logged and each phase is checkable: the machine, the login, the services, the build users, the two daemons, the three checkouts, the editor, the desktop, the question of whether any of it worked, and the size of what is left. A build that skips the question is a build that has never been run.
Return the KIWI description of the image, as SXML.
The element order is the schema’s, not a preference: a description is read by KIWI’s validator before it is read by anybody else.
Return the KIWI description as XML text, ready to be written to a file.
Return images.sh: what the build does to the files it produced.
KIWI calls this last, once per artefact, with the name it gave the image
in $1. Both kinds are named here - the ISO you boot and the raw
image you install - because a file people copy to a stick should say
what it is.
Return heks-render: the desktop’s files, rendered on demand.
The image is built with this already done - that is what the last phase of config.sh checks - so this is not the first boot: it is the way to do it again. A channel pin moves, a home is lost, a palette switch goes wrong, and the answer is one command rather than a reinstall.
It renders exactly what the build renders, in the same order, because two lists that are meant to be the same list are two lists that will disagree.
Return the unit that renders the desktop on the first boot, if it was not.
It exists for the builds that skip the rendering on purpose, so it is
only enabled by image-render-at-build? being #f. The
condition is the marker both the build and heks-render write: an
image that was rendered leaves it behind, and the unit then has nothing
to do even where it is enabled.
Return the KIWI <repository> elements for the image.
Return the packages the live session itself needs.
Return the live user’s home directory inside the image.
It is spelled out rather than computed from (getenv "HOME")
because it is a path *inside another filesystem*: the one the build is
not running in.
Write the KIWI description for dir and return the directory.
Four files, of which three are the description and one is the overlay that config.sh installs: a description is a directory, not a configuration file, and KIWI expects exactly this shape.
(patterns-base-base patterns-base-enhanced_base patterns-gnome-gnome_basic curl git gpg2 guix nix dracut-kiwi-oem-repart)
(ca-certificates cracklib-dict-full diffutils filesystem gawk glibc-locale grep gzip openSUSE-release procps shadow udev xz)
"/var/log/heks-image.log"
(dracut-kiwi-live)
"heks-linux"
("guix" "nix" "maak" "heks-toon" "lambdock" "emacs" "niri" "waybar" "wezterm")
((".config/niri/config.kdl" . "the compositor's configuration") (".config/waybar/config.jsonc" . "the bar's configuration") (".config/waybar/style.css" . "the bar's stylesheet") (".config/rofi/config.rasi" . "the launcher's configuration") (".config/mako/config" . "the notifications' configuration") (".config/btop/btop.conf" . "the monitor's configuration") (".bashrc" . "the shell") (".emacs.d/init.el" . "the editor") (".local/bin/heks-language-label" . "the bar's layout label") (".local/bin/heks-wallpaper" . "the wallpaper engine") (".local/share/icons" . "the icon themes") (".config/digital-art-dreams" . "the wallpaper collection"))
Next: (heks-linux lambdock), Previous: (heks-linux gtk), Up: API