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 0Hm3CGu5fmekCAAAqHPOHw:P1 (envelope-from ) for ; Wed, 08 Jan 2025 17:44:11 +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 0Hm3CGu5fmekCAAAqHPOHw (envelope-from ) for ; Wed, 08 Jan 2025 18:44:11 +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=s1motTdr; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QBVLlVBH; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736358250; 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=/01dKeoUrsHROvtL/sVduCHj5bO6IO54eFoO8wJpGMY=; b=SrT6y9NSvXm715+cQt1kvhXacPvbBWoMdNQ4oaweEG+e+Lt8fML3fUQrQEuRDN5Cylfd5f 4TRtLKSY/GbvQ+68KIth1qVqdMWKM/xhIYBxOQzakI8CNygNd3ndvyBBhjtn0Ddl4StmfO MrA8o53bAXTjyZeI7EDFn25b6imu3MrCydasq6Mzp1MxbqW7ey1uJnMVASylanaurowuEg mE0BxWL9VHGF9AebxCfdmldkRdUjpTAM7De8yd0bYapy2zHCJ/URVoU/6NkxBHiNlL83s/ thjjxSLdqF73vQBpJ9m4WBnKhx3CPIYPUsMnffJemm8ncvmZR2SqbMZizFaceg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=s1motTdr; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QBVLlVBH; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736358250; a=rsa-sha256; cv=none; b=JxRJ5miZkl5K+e29V/5cYLEF/miHppqABgMxLoF0VbcHSZ/AfxkvYFgVt8cMITyNr5LbN2 qWsXf0BH9X2z3MJEtHm6uGKzUpgCRXytnjHDclmxFZUxOs/rzNxIvYvEnZwR6hFl8FPEx9 cpuWpEiIOUH93owmVkmvDcg6HKHlhne4tRcfwShY65+PsTA+48H2fTLINY/oVD6W9leAuq +Or7lRyGPF7iIcs+ow8mFxXzOaO7iFsvuTrwowjtYyB8I+PD4Acq+Ulq6WHwJiGei9Ivpy j+rdIbTMp6W4pHyXtuyRpLBAgaDqTYpKvuE4zqGFHuaNOibpW+F9oFl5LYtEOQ== 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 E5ED043350 for ; Wed, 08 Jan 2025 18:44:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5V-0005f8-BY; Wed, 08 Jan 2025 12:43:26 -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 1tVa5H-0005YE-Ma for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:12 -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 1tVa5H-0003D4-7v; Wed, 08 Jan 2025 12:43:11 -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=/01dKeoUrsHROvtL/sVduCHj5bO6IO54eFoO8wJpGMY=; b=s1motTdrBse30KiIBqsdXvBYWUH1rT9VzcrZu7L3hrIwL7Z/rgVwb69iwZkow0yq1QgchecewDNCA12cKGDu/Bb1SPe1xHnv+yFjLyh1WTOZAbxELcWmm0BQvqP7IjjB/TnIayXezAZgCrGgrMPMXa7iy2lHLoOpbhVx52qa4DR2Ab87RYvhbo/h2Z+jsTMx+4UdiTMZYSddaIBeCIq2UxpYE/BQWsdjpLhc5uHQUS3Jc7Q3wNillPHcgODxt4Dcd7IaFnqMfvY/BTBQzCmHjZSG23vQwS0/xnLAkBwsk33HO5cQYjzrd/vktZiwnbKHlGQOEgI2H5PNs2hqefKukg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5C-0007tB-EF; Wed, 08 Jan 2025 12:43:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 09/12] home: services: Add log rotation service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, janneke@gnu.org, ludo@gnu.org, maxim.cournoyer@gmail.com, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:06 +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.173635816230186 (code B ref 74860); Wed, 08 Jan 2025 17:43:06 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:42 +0000 Received: from localhost ([127.0.0.1]:48808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4n-0007qj-RS for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35704) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4h-0007ol-NF for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:36 -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 1tVa4c-0002vF-FG; Wed, 08 Jan 2025 12:42:30 -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=/01dKeoUrsHROvtL/sVduCHj5bO6IO54eFoO8wJpGMY=; b=QBVLlVBHhu0j4+7W7itD u8nfYaHsmoZF71moZJY/Yt5wIxMqWNZYOISdhysVxPdNTK0G+QOnSm2yd0IJ+7irg+b2FmTkUQZPL PrWwBqLwtBeJORl15rHVyvZwhjuseeq1SXTz0jUp5kgarRMVVVtY+RL3k1uvjRsddCah4xvidEYYw zi6ApQM8jKTyr6iXVFxQY6F0ghF/Nzu+lCUfV3f3Yv+ynju2d+AjYCMQQWYQAb7JD5XlQh8Dt0jr6 n/NZi6tRroEyOj9MCIQpCHz8qUtXJ5AinE9v2obmg7ip7QRFhdtVtpTffDnz8Z39BIwiEOE22k7N4 Po62BFzCQdoL0Q==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:53 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.18 X-Spam-Score: -1.18 X-Migadu-Queue-Id: E5ED043350 X-TUID: OySNg7OBtM3X * 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 8ed5c16dda..d0e53feff2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20909,6 +20909,7 @@ Log Rotation be a @code{log-rotation-configuration} record, as discussed below. @end defvar +@anchor{log-rotation-configuration} @c %start of fragment @deftp {Data Type} log-rotation-configuration @@ -47090,6 +47091,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 f118fe4442..e4840fd550 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.47.1