[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/12: home: home-shepherd-configuration: Add silent? field.
From: |
guix-commits |
Subject: |
02/12: home: home-shepherd-configuration: Add silent? field. |
Date: |
Mon, 14 Oct 2024 08:12:50 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 8221a6a1ac7759397813bf9a3a83be5d1a97c26a
Author: Dariqq <dariqq@posteo.net>
AuthorDate: Fri Oct 11 08:39:08 2024 +0000
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>
---
doc/guix.texi | 4 ++++
gnu/home/services/shepherd.scm | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index fb2a74f847..518f2878b6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -46075,6 +46075,10 @@ The Shepherd package to use.
@item auto-start? (default: @code{#t})
Whether or not to start Shepherd on first login.
+@item silent? (default: @code{#t})
+When true, the @command{shepherd} process does not write
+anything to standard output when started automatically.
+
@item services (default: @code{'()})
A list of @code{<shepherd-service>} to start.
You should probably use the service extension
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)))))
#~"")))
- branch master updated (221a922746 -> 6757bfdfc0), guix-commits, 2024/10/14
- 03/12: doc: Document home-shepherd-configuration-daemonize?, guix-commits, 2024/10/14
- 04/12: services: configuration: Document multiple configurations per field., guix-commits, 2024/10/14
- 05/12: image: Use file system options in make-vfat-image., guix-commits, 2024/10/14
- 06/12: image: Add support for btrfs., guix-commits, 2024/10/14
- 08/12: gnu: git-annex-remote-rclone: Upgrade to v0.8, guix-commits, 2024/10/14
- 10/12: gnu: nvc: Update to 1.14.0., guix-commits, 2024/10/14
- 11/12: home: services: unclutter: Inherit $DISPLAY., guix-commits, 2024/10/14
- 01/12: doc: Refer to ‘iso-codes’, not ‘iso-codes/pinned’., guix-commits, 2024/10/14
- 02/12: home: home-shepherd-configuration: Add silent? field.,
guix-commits <=
- 09/12: gnu: xen: Update to 4.19.0. [security fixes], guix-commits, 2024/10/14
- 07/12: services: tor: Add support for pluggable transports., guix-commits, 2024/10/14
- 12/12: doc: Define the purpose, membership, and creation of teams., guix-commits, 2024/10/14