aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDariqq <dariqq@posteo.net>2024-10-11 08:39:08 +0000
committerLudovic Courtès <ludo@gnu.org>2024-10-14 14:08:42 +0200
commit8221a6a1ac7759397813bf9a3a83be5d1a97c26a (patch)
treeb384200dbc8547a23d664140644af9ede5b82164 /gnu
parentff5072d2707656fb43a5b1428d5ee127a700228c (diff)
downloadguix-8221a6a1ac7759397813bf9a3a83be5d1a97c26a.tar
guix-8221a6a1ac7759397813bf9a3a83be5d1a97c26a.tar.gz
home: home-shepherd-configuration: Add silent? field.
* gnu/home/services/shepherd.scm (home-shepherd-configuration): Add silent? field. (launch-shepherd-gexp): Conditionally invoke shepherd with --silent. * doc/guix.texi (home-shepherd-configuration): Document it. Change-Id: I1ce7a92c2777ebded39fe293b0bdcbd03562b4fc Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/home/services/shepherd.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm
index dfe4030a4e..75b80bfa26 100644
--- a/gnu/home/services/shepherd.scm
+++ b/gnu/home/services/shepherd.scm
@@ -32,6 +32,7 @@
home-shepherd-configuration?
home-shepherd-configuration-shepherd
home-shepherd-configuration-auto-start?
+ home-shepherd-configuration-silent?
home-shepherd-configuration-services)
#:re-export (shepherd-service
shepherd-service?
@@ -58,6 +59,8 @@
(default #t))
(daemonize? home-shepherd-configuration-daemonize?
(default #t))
+ (silent? home-shepherd-configuration-silent?
+ (default #t))
(services home-shepherd-configuration-services
(default '())))
@@ -107,7 +110,8 @@ as shepherd package."
(scheme-file "shepherd.conf" config)))
(define (launch-shepherd-gexp config)
- (let* ((shepherd (home-shepherd-configuration-shepherd config)))
+ (let* ((shepherd (home-shepherd-configuration-shepherd config))
+ (silent? (home-shepherd-configuration-silent? config)))
(if (home-shepherd-configuration-auto-start? config)
(with-imported-modules '((guix build utils))
#~(unless (file-exists?
@@ -125,6 +129,7 @@ as shepherd package."
#$(file-append shepherd "/bin/shepherd")
"--logfile"
(string-append log-dir "/shepherd.log")
+ #$@(if silent? '("--silent") '())
"--config"
#$(home-shepherd-configuration-file config)))))
#~"")))