From patchwork Fri Jan 17 22:19:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 37122 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 073DC27BBEA; Fri, 17 Jan 2025 22:21:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7D5E627BBE2 for ; Fri, 17 Jan 2025 22:21:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYuiD-0006GB-PM; Fri, 17 Jan 2025 17:21:10 -0500 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 1tYuiC-0006FT-0g for guix-patches@gnu.org; Fri, 17 Jan 2025 17:21:08 -0500 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 1tYuiB-0002hB-IS; Fri, 17 Jan 2025 17:21:07 -0500 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=k+2X3Z70cToyD0NvQfPSifNY8fOMJUycuzqUUgkZ8Mo=; b=pH4igSYBsEZfK0t/8EBZDeihn1i7c58lLqr9Oju2rUpEiso0TW/6u5vaVcBg+GqF07EDArp+MWsXefvYJRohX4YFdfmCkzexgCXCp4gCHDp+DfSOma2QJLxKbURDLVmCEvPHFUvyuv02yavTl5HXL5s7g6hBkmr9UzkOw3WJkpaSB2zxbR7dKwq3yGbkZkKYYeoNAPVqhx9BRTTSZzMOIFkhfFU8Uo8yWUaRxcpIqwtgz9dfvEMJ4Y/pEvSBlKXm9a5QR5ASH6uw/BGUx19zBnGo4brOOOzOhJ9qu2ztUOgsfvtHLTCpQLH8w3KMb43OFG3QSmUI/bL1CQqvVm0G/Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tYui7-0002Yc-2H; Fri, 17 Jan 2025 17:21:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74997] [PATCH 3/4] home: services: shepherd: Add =?utf-8?b?4oCYdHJhbnNpZW504oCZ?= and =?utf-8?b?4oCYdGltZXLigJk=?= services. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: herman@rimm.ee, ludo@gnu.org, andrew@trop.in, janneke@gnu.org, maxim.cournoyer@gmail.com, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Fri, 17 Jan 2025 22:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74997@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Herman Rimm , Ludovic =?utf-8?q?Court=C3=A8s?= , Andrew Tropin , Janneke Nieuwenhuizen , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-Xcc: Herman Rimm , Ludovic =?utf-8?q?Cour?= =?utf-8?q?t=C3=A8s?= , Andrew Tropin , Janneke Nieuwenhuizen , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by 74997-submit@debbugs.gnu.org id=B74997.17371524169700 (code B ref 74997); Fri, 17 Jan 2025 22:21:03 +0000 Received: (at 74997) by debbugs.gnu.org; 17 Jan 2025 22:20:16 +0000 Received: from localhost ([127.0.0.1]:39138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYuhL-0002WH-Io for submit@debbugs.gnu.org; Fri, 17 Jan 2025 17:20:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36652) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYuhB-0002P7-LQ for 74997@debbugs.gnu.org; Fri, 17 Jan 2025 17:20:06 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYuh6-0002MA-5L; Fri, 17 Jan 2025 17:20:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=k+2X3Z70cToyD0NvQfPSifNY8fOMJUycuzqUUgkZ8Mo=; b=cCWj278F11FkLgkeXfbs H1t018v0Te5ZlO1cC6yyyyayG+6eObkBHvqSHG8QmUPWAtjt85e/JSq6ZI6p5wTnp9zmIOY1OmAHJ 4kIJJqxBaSLbo8EJNzkbHfx4ZaT0P7r61WUV3AxtxCAw1Oz1yzFZJ3PEKYkIbjJbdNgfXkdO4waCs cIGdjY2Vyw6qAr0YlvfO3TYVEf9vzxjFvXjZ4Kblf7Y3rmXpwA4nvosYCG56Xer8hBDIkWAUly1HE rgUSZZyWC9uZR8oBDIlBWYnZrljkgxyYKvPEoEXr0g+j04XVWyYPyHnQQKVKzFsapW3m8VsGYH2aj QU8TFDPlU82nRw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 17 Jan 2025 23:19:22 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/home/services/shepherd.scm (home-shepherd-timer-service-type) (home-shepherd-transient-service-type): New variables. * doc/guix.texi (Shepherd Home Service): Document them. (Shepherd Services): Add anchor. Change-Id: Ia4eb7cf043f4661c64f5ca81b8989a451532aa18 Reviewed-by: Maxim Cournoyer --- doc/guix.texi | 12 ++++++++++++ gnu/home/services/shepherd.scm | 21 +++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3e377ca9f4..a33f2f3083 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -45684,6 +45684,7 @@ Shepherd Services (shepherd my-shepherd)))))) @end lisp +@anchor{shepherd-transient-timer-services} @cindex @code{transient} service, Shepherd @defvar shepherd-transient-service-type This service type represents the Shepherd's @code{transient} service, @@ -47347,6 +47348,17 @@ Shepherd Home Service This service is part of @code{%base-home-services}. @end defvar +@defvar home-shepherd-transient-service-type +@defvarx home-shepherd-timer-service-type +These are the @code{timer} and @code{transient} Shepherd services. The +former lets you schedule command execution for later, while the latter +can run commands in the background as a regular service. + +@xref{shepherd-transient-timer-services, the system @code{timer} and +@code{transient} services}, which are their Guix System counterparts, +for more info. +@end defvar + @node Secure Shell @subsection Secure Shell diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index 37ad1489d6..b2b141d4de 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2023 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen -;;; Copyright © 2024 Ludovic Courtès +;;; Copyright © 2024-2025 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +34,10 @@ (define-module (gnu home services shepherd) home-shepherd-configuration-auto-start? home-shepherd-configuration-daemonize? home-shepherd-configuration-silent? - home-shepherd-configuration-services) + home-shepherd-configuration-services + + home-shepherd-transient-service-type + home-shepherd-timer-service-type) #:re-export (shepherd-service shepherd-service? shepherd-service-documentation @@ -181,3 +184,17 @@ (define home-shepherd-service-type (define-service-type-mapping shepherd-root-service-type => home-shepherd-service-type) + +;;; +;;; Timer and transient service maker. +;;; + +(define home-shepherd-timer-service-type + (service-type + (inherit (system->home-service-type shepherd-timer-service-type)) + (default-value '()))) ;requirement + +(define home-shepherd-transient-service-type + (service-type + (inherit (system->home-service-type shepherd-transient-service-type)) + (default-value '()))) ;requirement