From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GPklGcVy7Waj+AAAqHPOHw:P1 (envelope-from ) for ; Fri, 20 Sep 2024 13:04:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id GPklGcVy7Waj+AAAqHPOHw (envelope-from ) for ; Fri, 20 Sep 2024 15:04:05 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=M7NbVRmY; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=qBPXC4CW; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), DKIM not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726837445; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ynMeSiIfiNYKdS1npZdASb9aWd+nBvIRDoUG4R1d+rA=; b=mUW9zgT/StXyolIeioVCF4gMZHoMFcNwAHID9p0xO9JJJsknnWRM/9vMZWUQPEfttL9PMI t8aqVapaWqSVtQ+ng6DTtGf5MNczLKSlEJ6WzhXd48e3skRQA4710HDaQkCNJn9oNxIlFW 3PSvUl5zLDSo5kVSmv+wniHwiCjwl/y7It/ojYP9lQuPfwDE2l0uqp1Px6bIzwqHYcNVPF mtj9BFvIvlxJCMzYZQQxGkNI+WVQ9GMhXnoWgZ/xAVhfpWK0803Dt479oCcFAUAvgLOUcn WolJ/7EF4nmRWbtnAiEu6T0bOUaLWpAqKNWAV2l7KxELBp/mCfYmLFtrTc+/Nw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=M7NbVRmY; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=qBPXC4CW; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), DKIM not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726837445; a=rsa-sha256; cv=none; b=RVoTixRo+k1lzFU3T2UDF23ri9CLUlhHfUjpJVQK4+kPJQYQ5KE5lIDVwF90nzJHrePumW 9k34PLLgTPJWio/0QAl0xKryqGXtJulm5BCt1mzJiH3+U2SYNWf4TrFNd59em2xsgRUTVd 6rRLQMNQPrIg2vaml7fucjxTXAUwhUV7OH3JWzjx/X4tGmytTZaNcJDevGBM153HcmYucS 7Mt6U5ryVbQt4ingivOlWR82kzj/kie8ReJIs3RHpr9LUsuycufdvTIYhh+yESJ2Dtp2iI rZn08xeJidUSk2YR/7rr0CJ9pltrSI9EH+DjnxJP9aAn0MCsQIg+jpu0lp9UUg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 832B76E4C0 for ; Fri, 20 Sep 2024 15:04:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srdIY-0005qO-75; Fri, 20 Sep 2024 09:03:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srdIW-0005qB-JC for guix-patches@gnu.org; Fri, 20 Sep 2024 09:03:45 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srdIW-0002Od-AO for guix-patches@gnu.org; Fri, 20 Sep 2024 09:03:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=ynMeSiIfiNYKdS1npZdASb9aWd+nBvIRDoUG4R1d+rA=; b=M7NbVRmYld3sPUAgAjs12FRFVK3oNjinYGJXXjZwqATFvnGWktwZXF9tW78mSY+dAuS+bNIoDisFGDwdOvN7m7SusXywvYRDMTvz/j0inahSDkK3IW8VGQxxSsQjNbVzSOjZbMJY5E27IZ+lBc8nPBNmFaZGgsqprJoFgCVHYNexLcdzBHTqhW3wQv/Payk7za87C/KhnJjoFFcngB3dR6+ZecjpZhnW4v+arPYLmZ4j8AJOnr+KV9/x29TBhSkkumHdqZP/KnVkz3hJ8+eHCsT/djX22MIVWSgKlaN+y93NPH6e2yWsPD2huM5nyAPmB4MkR/B6P7bxJ36rbPWHOg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srdIo-00011P-LJ for guix-patches@gnu.org; Fri, 20 Sep 2024 09:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73383] [PATCH] home: home-shepherd-configuration: Add silent? field. Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73383 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73383@debbugs.gnu.org Cc: Dariqq , ( , Andrew Tropin , Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ( , Andrew Tropin , Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.17268374183889 (code B ref -1); Fri, 20 Sep 2024 13:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Sep 2024 13:03:38 +0000 Received: from localhost ([127.0.0.1]:34347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srdIM-00010Z-0N for submit@debbugs.gnu.org; Fri, 20 Sep 2024 09:03:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:54176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srdIK-00010R-5c for submit@debbugs.gnu.org; Fri, 20 Sep 2024 09:03:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srdI0-0005nV-Re for guix-patches@gnu.org; Fri, 20 Sep 2024 09:03:13 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srdHy-0002Mw-MW for guix-patches@gnu.org; Fri, 20 Sep 2024 09:03:12 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CDE45240104 for ; Fri, 20 Sep 2024 15:03:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726837386; bh=uERdxSaua7180I7dwOsDx4Ic7NcPS0f6ltSNz3B+04g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=qBPXC4CW67iypA0LFKmK+AGEbBO/eQ37OE4NiLu5Ag1O8rc7LJBmIFunKa69jfgtH ytqV4gjPBDeAnBb+9tPrqp3/wQty6l1SNWTkgmS0+pB8idvfkC7cfuRgSpq34F/FQp 4UdTkR+Ekh53m9Je657qPD3B9lI6m84rXBf5Pmb2VoSN76cY/vRmRsAxTApXXAEsib 1UZ/j0ySqd7Hwr1z/oOBoappsvwbAioxLxchst4NQp0AiuysxA6LDF/YXw8MLg35Hl q8IHVMcf74LgRwLlGpn7PNv2bHf2fnxTGXjAbePdayFyxW4g9CdGzBQ8PbnHjFOS8E aKkBHBkFvwx6Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X9CHG20Q3z9rxG; Fri, 20 Sep 2024 15:03:06 +0200 (CEST) From: Dariqq Date: Fri, 20 Sep 2024 12:39:23 +0000 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=dariqq@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 832B76E4C0 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -7.05 X-Migadu-Spam-Score: -7.05 X-TUID: Ib3EhZxmrv4v * 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 --- Hi, This adds a configuration field to the home-shepherd to optionally invoke it with --silent. See [1] for details. The option currently only actually works as advertised when using the development branch of shepherd, for the current version (v0.10.5) the --silent parameter is ignored. I have set the default value to #f to not change the current behaviour. For the documentation I am not perfectly happy with my description because the behaviour is opposite of the description (Setting to #t causes no output to stdout), maybe there is a better way to phrase this? Also is there a better way to communicate that it only works when the auto-start? field is also #t? Related: The daemonize? field is not documented and the accessor is not being exported. [1] https://issues.guix.gnu.org/72277 doc/guix.texi | 3 +++ gnu/home/services/shepherd.scm | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 52e36e4354..ab8cf54ae8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46057,6 +46057,9 @@ Shepherd Home Service @item auto-start? (default: @code{#t}) Whether or not to start Shepherd on first login. +@item silent? (default: @code{#f}) +Whether or not the auto-started Shepherd should output to stdout. + @item services (default: @code{'()}) A list of @code{} 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..17b005ed71 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -32,6 +32,7 @@ (define-module (gnu home services shepherd) 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 @@ (define-record-type* (default #t)) (daemonize? home-shepherd-configuration-daemonize? (default #t)) + (silent? home-shepherd-configuration-silent? + (default #f)) (services home-shepherd-configuration-services (default '()))) @@ -107,7 +110,8 @@ (define (home-shepherd-configuration-file config) (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 @@ (define (launch-shepherd-gexp config) #$(file-append shepherd "/bin/shepherd") "--logfile" (string-append log-dir "/shepherd.log") + #$@(if silent? '("--silent") '()) "--config" #$(home-shepherd-configuration-file config))))) #~""))) base-commit: e9d903f146865db5948abd271a5c7e763681b4e9 -- 2.46.0