Ludovic Courtès f8ad72ac08 README: Fix typos. | 3 years ago | |
---|---|---|
.gitignore | 3 years ago | |
README.md | 3 years ago | |
code.css | 3 years ago | |
d3.v6.js | 3 years ago | |
demo.gif | 3 years ago | |
explore.scm | 3 years ago | |
graph.js | 3 years ago | |
style.css | 3 years ago |
“What’s this?”, you ask. It’s a hack, initially written for a FOSDEM 2021 talk, that allows you to navigate the services of your Guix System configuration and the connections among them.
It’s very bare-bones, my friend! Assuming the Guix modules are in your
GUILE_LOAD_PATH
—it’s the case on Guix System—you can run, say:
./explore.scm /run/current-system/configuration.scm
That spawns a web server on port 8080, which you can talk to from your
browser at http://localhost:8080
. And what do you see there?
Voilà!
If you’ve tried guix system
extension-graph
before, it is showing something similar. On the graph displayed, each
node represents a service of your system configuration, and each edge
represents a service extension. Essential services are shown as red
circles, “base”
services
are represented as smaller red circles, and user services are smaller
gray circles. When hovering over a service, its documentation is
displayed at the top left.
When clicking on a service, its value gets displayed. For example,
the value of the udev
service is a record containing (1) the (e)udev
package it uses, and (2) the set of udev rules. For the openssh
service, the value is a record listing the various sshd
options.
The graph shows, for example, an arrow from the openssh
to the
accounts
service, which is responsible for setting up user accounts.
When clicking on this arrow, we see the “value” that openssh
contributes to accounts
: it’s a list consisting of the sshd
group
and the sshd
user account—the “privilege separation” account used by
sshd
.
Last, when double-clicking on a service, you can see the effect of
folding all the services that contribute to
it.
For example, when double-clicking on shepherd-root
, all the services
with an incoming edge contribute a value to this service—a Shepherd
service—and are no longer displayed. At this point, clicking on
shepherd-root
shows its new value: a list of shepherd-service
records.
Ultimately, all services can be folded into
system
,
which the the “root” of all services, representing the final, assembled
operating system.
Modern GNU/Linux distributions are complex beasts and it’s hard to get the big picture. This tool aims to help users answer questions such as: What components make up my system? How are they composed together? How does the high-level configuration of a service translate into the configuration of lower-level services?
Ultimately, I would like to think of this tool not just as a helper for Guix System users, but also as an educational tool—a tool to help users and enthusiasts learn how things are glued together. It’s about empowering users, reducing the gap between “those who know” and “those who use”.
Who knows what’s next! There are certainly glitches here and there in
the user interface that could be fixed, and convenience features that
could be added. Perhaps this tool could be made part of Guix proper, as
a new guix system explore
sub-command?
So far the tool is only about exploring the system. What if we allowed users to edit their system configuration right from the user interface? Food for thought!
Things you can do:
Ludovic Courtès, February 2021.