From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qGFvLAy9XGcxaAAAe85BDQ:P1 (envelope-from ) for ; Fri, 13 Dec 2024 23:02:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qGFvLAy9XGcxaAAAe85BDQ (envelope-from ) for ; Sat, 14 Dec 2024 00:02:36 +0100 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=qejToSr2; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ByNTTeEl; dmarc=pass (policy=none) header.from=gnu.org; 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=1734130956; a=rsa-sha256; cv=none; b=lkN1ZLcSOkTHcehNtDoYWGMLFJsu0sI3J0VKw0/WE+gEJFNTI1Xo5+Qt+grfhbNJmi5Uwr KrAvvTPv3i4Vrb6anaoPrXdbEVTuc7k+RBvGGyUqwAuU+HXc5K5AdNUq6A8SFKGJvVySMX JvbNgc7GhtfiqQzFSmi2Amt3wqvWUikoxrzRoo5X1QRU++0LO/vjbxZqJgJ507lWIUaWzG Qs1JR1PmZhxASgjBQC3xo0VuLUWh4MZGfysGK7uqfNuRMJWBEsasancPreFeoRmRMgp9rx OSiUfz6ywFHK3e3KBtb2+1KM5SkBj93ttc6BX8EneDpiPZqKlQUo5E8Zkdfr1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=qejToSr2; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ByNTTeEl; dmarc=pass (policy=none) header.from=gnu.org; 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=1734130956; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=P8tnYTndckonVRpLT3Q2ijBSorv/4zbJjKSmNAUiqW8=; b=lZKMOGqEeC9qydWO2shKFW/KKcCPaE14ofdx2XEV2MtpaaYQsedWvU3JtOJOfEZX/M7gWh w7pOjnT1G7v94wW3PPuJjOfTr3fslWhgyJep7lxDbd+7iX3Q9rTaEkGhvp3U5eTY3ZwWhc 2o9akWIs87P6/a45v/1nSYHjbB1qfqI1fpRV2QdYwcRh8uwl6zaH9nu2kvhASq6rDhXUCA Mw9GYAAr7IEFotBqBeFoIqyhEC/+8nS9fEiRzIoXbuC2WqDSrlriVxWkvETUCpFGeNIqGg AkGMVkgOT9cvd3am6L368UDHGHYz1yBvMhl2xFmoizHYglVld6WEGRB1FNYpEw== 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 1291F1BED2 for ; Sat, 14 Dec 2024 00:02:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMEfi-0003z3-Vs; Fri, 13 Dec 2024 18:02:11 -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 1tMEfe-0003xL-1L for guix-patches@gnu.org; Fri, 13 Dec 2024 18:02:06 -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 1tMEfd-0002lf-MG for guix-patches@gnu.org; Fri, 13 Dec 2024 18:02:05 -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=P8tnYTndckonVRpLT3Q2ijBSorv/4zbJjKSmNAUiqW8=; b=qejToSr2YeFw9mwLQdbcVQCg9+JCmdWwSwA91JzG5V8S6qrTfOaMhD0W+4WlXxQp9WOGp483NHLuswlQ/85izPhVp+UTA1RcV2u6pC+OcUEUCTmqgLj1IlIg8iV2ovuJv/2Et32vKSyjmQecuWBpBhOtgd57JcIbNWNr7AS/IQ+9QwCPywbq7wCZ6Ghp0qOwrTWLclAkdyvrJtYC/RZ2MZo5NkZtSm16T61p3sSpetf4kXa3//0tNiz6ivpOumUelPJ2LFLOubme2ocHs837roRitJn2bSik7Z/GfHcYyIc+F2T5PylRIlMP3SIIAI0BcjpDnCfoctmA64HXq+ZfWQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tMEfd-0001Yu-9u for guix-patches@gnu.org; Fri, 13 Dec 2024 18:02:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH 08/10] home: services: Add log rotation service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Fri, 13 Dec 2024 23:02:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , ( , Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-Xcc: ( , Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.17341309125912 (code B ref 74860); Fri, 13 Dec 2024 23:02:05 +0000 Received: (at 74860) by debbugs.gnu.org; 13 Dec 2024 23:01:52 +0000 Received: from localhost ([127.0.0.1]:44581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMEfL-0001X2-3l for submit@debbugs.gnu.org; Fri, 13 Dec 2024 18:01:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMEfI-0001Wa-6a for 74860@debbugs.gnu.org; Fri, 13 Dec 2024 18:01:45 -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 1tMEd5-0001p2-94; Fri, 13 Dec 2024 17:59:28 -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=P8tnYTndckonVRpLT3Q2ijBSorv/4zbJjKSmNAUiqW8=; b=ByNTTeElzg12c56Nn5VY u3rasnjpPqwCZhCu+7HsKA5hSuFkRaF+/HdZM5HCor1+bvoWGEoz7mdKf2b81+gFyXI4fSSa2Y3wE /lMkyYnH2AUsPf8d9C3IMuIrfZEbhqdpUHbd25npJ5w5iBZTds9SIWqtc8GKU8WimnzH//buLBptv kpKr/uHgvri+jogs4TyL17HA7MBhKLorwHpCAZ6rNTXum1gN/5cZvG5bdfFQqBXsG0NPEfDzp0h4l 8Vpid4K1CkfqTZcU5BOlk+6ORjQSkIO9tXex0VIUPs/OJ7dwem9iAudxw/dWlHbyVIZRlnHil+hAk fmVnCUMtjh/5Xw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 13 Dec 2024 23:58:28 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.43 X-Spam-Score: 0.43 X-Migadu-Queue-Id: 1291F1BED2 X-Migadu-Scanner: mx12.migadu.com X-TUID: V1lSMaMt/AD+ * gnu/home/services/admin.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Shepherd Home Service): Document it. Change-Id: I37ac171147c236b05d6d3b226e9072ab7524dfe9 --- doc/guix.texi | 15 +++++++++++++++ gnu/home/services/admin.scm | 31 +++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 47 insertions(+) create mode 100644 gnu/home/services/admin.scm diff --git a/doc/guix.texi b/doc/guix.texi index 1df1ccc649..788a9b4957 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20803,6 +20803,7 @@ Log Rotation be a @code{log-rotation-configuration} record, as discussed below. @end defvar +@anchor{log-rotation-configuration} @deftp {Data Type} log-rotation-configuration This data type represents the configuration of the log rotation service. Its defaults should be good for most use cases. @@ -46587,6 +46588,20 @@ Shepherd Home Service @end table @end deftp +@cindex log rotation, for user services +The Shepherd also comes with a @dfn{log rotation service}, which +compresses and then deletes old log files produced by services and +daemons that it runs. This service is made available through +@code{home-log-rotation-service-type} as described below. + +@defvar home-log-rotation-service-type +This is the service type for the user Shepherd log rotation service +(@pxref{Log Rotation Service,,, shepherd, The GNU Shepherd Manual}). +Its value must be a @code{log-rotation-configuration} record, exactly as +for its system-wide counterpart. @xref{log-rotation-configuration}, for +its reference. +@end defvar + @node Secure Shell @subsection Secure Shell diff --git a/gnu/home/services/admin.scm b/gnu/home/services/admin.scm new file mode 100644 index 0000000000..1cd398cc51 --- /dev/null +++ b/gnu/home/services/admin.scm @@ -0,0 +1,31 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services admin) + #:use-module (gnu home services) + #:use-module (gnu services) + #:use-module (gnu services admin) + ;; For the 'home-shepherd-service-type' mapping. + #:use-module (gnu home services shepherd) + #:export (home-log-rotation-service-type) + #:re-export (log-rotation-configuration)) + +(define home-log-rotation-service-type + (service-type + (inherit (system->home-service-type log-rotation-service-type)) + (default-value (for-home (log-rotation-configuration))))) diff --git a/gnu/local.mk b/gnu/local.mk index 39b142af5a..d96fa61dc4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -100,6 +100,7 @@ GNU_SYSTEM_MODULES = \ %D%/compression.scm \ %D%/home.scm \ %D%/home/services.scm \ + %D%/home/services/admin.scm \ %D%/home/services/desktop.scm \ %D%/home/services/dict.scm \ %D%/home/services/dotfiles.scm \ -- 2.46.0