From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aKjVLbDkCGdx5QAA62LTzQ:P1 (envelope-from ) for ; Fri, 11 Oct 2024 08:41:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aKjVLbDkCGdx5QAA62LTzQ (envelope-from ) for ; Fri, 11 Oct 2024 10:41:20 +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=dPW7ZDb7; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=h1LsmtJb; dmarc=fail reason="SPF not aligned (strict), DKIM not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728636080; a=rsa-sha256; cv=none; b=Kcq6J0Wih+nCaZjlAYEAJknt+WPQTkpiGewdNarULsyIb7byDWXuhlh9atbMw4sHWB11d8 f5Y8bRTaqz5gsfDJnJGkvlguGrVajOZP1AvT52J1CDUvJVPymjzbYsVUKeQcb+5nJFI42O meKBgBxX2cNAIujpVC2mRb1CcrHlK3JI0Fp/7ZnN/eZtOE4RopvVcFIjseTSENaxjPVKU7 I1uAfuQSJh+1B3G7y6gRSDR49bkQSCdma6aiTqTNW2/xkfN8OEvjjdvhYw7vWudGMKGf/0 tmiFCQv8HjklP8+jL0w65mrEAm9xxzmCWFa7hB0gY22McTb8myEB2I1old0sLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=dPW7ZDb7; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=h1LsmtJb; dmarc=fail reason="SPF not aligned (strict), DKIM not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728636080; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=AjrJCpgdgXk5gsDlJk+wfA7hoJdjY0kOOTm8pArvcig=; b=rLduzajI4kyPzp4IlcZV1E2C+0HBgI4/fBSm99UCY8Dkr6aEjLoqunVFvs1Dl6+PA8S4jv z5uIiFusaN/xRnelmWRY1lb1nvaIpHf12srsdjvXttZb4VNbwwIluTZb0DRfbK5UwofKc6 zbDQqXHC7TIjSSxa1zQKWQ5wN6ra1Yr8/9yvd/Tg1WvIfoX8OOqVRdK8/sqZWMWRCs+DcQ Xpy0o/Gf5Rx92JNFyB3u3450qlLwLB56qGpHzgHupMg+NYHd6T/fxVzuOBfZtEl0+Ws7u9 LbVjF2vHXAPdkHzmwbeOwj9SFpW7UeQbcvGoz0ehU6B/xKpN6Jh0hLEblUOZDA== 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 913D63680D for ; Fri, 11 Oct 2024 10:41:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szBCe-00049e-1J; Fri, 11 Oct 2024 04:40:52 -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 1szBCc-00048y-B4 for guix-patches@gnu.org; Fri, 11 Oct 2024 04:40:50 -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 1szBCc-0006OM-1U for guix-patches@gnu.org; Fri, 11 Oct 2024 04:40:50 -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:References:In-Reply-To:Date:From:To:Subject; bh=AjrJCpgdgXk5gsDlJk+wfA7hoJdjY0kOOTm8pArvcig=; b=dPW7ZDb7dqTPTHNn5i0GT4V1vvxaFZUuK3lMaFYuljzIbvQ2Epf1hvDCfaX377pn9/80OWzFWnZPFvYk0rCe2p0iMZD1Z0Wzty8eZitkxxtdjOfSzpG/d9ARZ4oKbZX/9ln7cYXujfD44dXcgJmxh4llXjrdMwRoav+vCr4kgquaOyxBrDQXFPCR8KP6feoJmSBi5GfRBzURV78p7RtAVO8vU8SDhZnIf/wuqdQtZbvPW2NkUrWKDo7Ms1oi6UdcSecGYpTq5pfsGUH1GjesOQ+6ulzBW+viJ9BQcT10YNRISC06ZSD2wOEPc5DjrkfLdAYATK/2MzW2X+zkMC1x5g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szBCo-0003yV-Eo for guix-patches@gnu.org; Fri, 11 Oct 2024 04:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73383] [PATCH v2 1/2] home: home-shepherd-configuration: Add silent? field. Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Fri, 11 Oct 2024 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 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-Xcc: ( , Andrew Tropin , Florian Pelz , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by 73383-submit@debbugs.gnu.org id=B73383.172863605315235 (code B ref 73383); Fri, 11 Oct 2024 08:41:02 +0000 Received: (at 73383) by debbugs.gnu.org; 11 Oct 2024 08:40:53 +0000 Received: from localhost ([127.0.0.1]:33395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCe-0003xf-SL for submit@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:53 -0400 Received: from mout01.posteo.de ([185.67.36.65]:51417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szBCc-0003xC-PQ for 73383@debbugs.gnu.org; Fri, 11 Oct 2024 04:40:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B7C36240027 for <73383@debbugs.gnu.org>; Fri, 11 Oct 2024 10:40:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1728636032; bh=xoAjCIM4xUD977C6w26sZkpiAA3G9oruzW4QIlAx8dc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=h1LsmtJbpu00tgrqZAgltC19NZ4ZelPOzVpPEq888k1QV1vQTmhzV8zyXBj3bM5gs 5B4jqKWO1mXDPw6gCkpzk2R7/47xw5U3on3hL/s/kgSvRZoJfwpvXm6u4akfLy8De9 ta62o9s5bFw/JWuo1JjeOQnjABd0r3qspIHtWFAQUZppWAED9J8jwq71lBwc0eZasH Fa7Ytgey4mahhJYkjZbg0wWdoS8M1N5n6D7Wu7WbvBgKvRQ8WJxcUPOv9k9uxC3uHB 7+fkYhD001F59mBSnisXZEYY0BR1YUkseBrSYPQnJj/HK/nPV0aFlfIYdxG+dw9eQ6 YzSNjfDH+54NA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XQ0Sb59VLz6tyf; Fri, 11 Oct 2024 10:40:31 +0200 (CEST) From: Dariqq Date: Fri, 11 Oct 2024 08:39:08 +0000 Message-ID: <604543b7f28f26505e5449b0dc6e46a52c6e325b.1728634996.git.dariqq@posteo.net> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.45 X-Spam-Score: 0.45 X-Migadu-Queue-Id: 913D63680D X-Migadu-Scanner: mx10.migadu.com X-TUID: mAHQLMaoy8i1 * 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 --- 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 8f3b8ef6cd..10d4214563 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46071,6 +46071,10 @@ Shepherd Home Service @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{} 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 @@ (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 #t)) (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))))) #~""))) -- 2.46.0