diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-03-11 22:15:47 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-03-18 16:03:33 +0100 |
commit | 25261cbf96a3bf58abc6e836d71bdabe9154a83c (patch) | |
tree | 9ffb3c4af07b848470589071e5cf9f4d9056076e /doc | |
parent | e607c377bb677ee4de0b0527adcef9d333767c0f (diff) | |
download | guix-25261cbf96a3bf58abc6e836d71bdabe9154a83c.tar guix-25261cbf96a3bf58abc6e836d71bdabe9154a83c.tar.gz |
guix home: Implement the 'extension-graph' and 'shepherd-graph' actions.
Until now these two actions were silently ignored.
* guix/scripts/home.scm (show-help, %options): Add "--graph-backend".
(%default-options): Add 'graph-backend' key.
(export-extension-graph, export-shepherd-graph): New procedures.
(perform-action): Add #:graph-backend parameter. Add cases for the
'extension-graph' and 'shepherd-graph' actions.
(process-action): Pass #:graph-backend to 'perform-action'.
* guix/scripts/system.scm (service-node-type)
(shepherd-service-node-type): Export
* tests/guix-home.sh: Add tests.
* doc/guix.texi (Invoking guix home): Document it.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index dbe281ead7..cb09978fab 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -38848,7 +38848,38 @@ environment. Note that not every home service that exists is supported $ guix home import ~/guix-config guix home: '/home/alice/guix-config' populated with all the Home configuration files @end example +@end table + +And there's more! @command{guix home} also provides the following +sub-commands to visualize how the services of your home environment +relate to one another: + +@table @code +@cindex service extension graph, of a home environment +@item extension-graph +Emit to standard output the @dfn{service extension graph} of the home +environment defined in @var{file} (@pxref{Service Composition}, for more +information on service extensions). By default the output is in +Dot/Graphviz format, but you can choose a different format with +@option{--graph-backend}, as with @command{guix graph} (@pxref{Invoking +guix graph, @option{--backend}}): + +The command: + +@example +guix home extension-graph @var{file} | xdot - +@end example + +shows the extension relations among services. +@cindex Shepherd dependency graph, for a home environment +@item shepherd-graph +Emit to standard output the @dfn{dependency graph} of shepherd services +of the home environment defined in @var{file}. @xref{Shepherd +Services}, for more information and for an example graph. + +Again, the default output format is Dot/Graphviz, but you can pass +@option{--graph-backend} to select a different one. @end table @var{options} can contain any of the common build options (@pxref{Common |