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 GIvYGiT0fmf9PAAA62LTzQ:P1 (envelope-from ) for ; Wed, 08 Jan 2025 21:54:44 +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 GIvYGiT0fmf9PAAA62LTzQ (envelope-from ) for ; Wed, 08 Jan 2025 22:54:44 +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=bNVVHMgC; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Ok4ktuoX; 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=1736373281; 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=rtx6jF9s547Sdf8qK+wTeWLZznPqsY3ur02Ejgc+6M4=; b=lu0BXh7vXUtBWhP8ru4aJh8SGIz5Z2pPzjn5Sv0gnlY7jbbBKAvlFT9wQeweH4y+x0o5ES c/zwnNkJqLl9QXNrHTgYN1gFlSjZQ6psXTAJqPCwuwYnlrZUhxeJsiAZmMm9MK1sqlreby yVueLnRrgzbWm1dJfZQq9mJxHbZtkebvdnT47Y+VTTA7r3MQW2WuS8n5v3cW6QTVsNFmaI CRaFcbhA+wcFUCwgZq+DLwtFvuO54whfoBdAWUka4dbiegzUEJpTaWxvjptB+FLcLzOtP0 lg496157GWpIu8NHR/hG/P8ZSi5qO+UvTP/FDQRFYArqFjwKPfCdbMkAIQ9HnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=bNVVHMgC; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Ok4ktuoX; 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=1736373281; a=rsa-sha256; cv=none; b=tfXyomJBkVAaEeSJaOJlIYQFJ+jad9IyR+7qXFUiUxsg1k7QqvJ/qMXLawob4hSes6zLTX GdaLl620xzJY9gOub76la8yaY/tOMd1sbbusigNMTvOcz+hc/MKjMoNQiPnQ7lNCgZQRYE UIK2Iv6Bu0FC34HlvoQFecI13qTYKKfLFHm01NYaWFYMkl9kwg/K3aihrjSUKlipS2Q42W /KSXVxhleyo0ihz0a4s3Z9DVMRFANr6reYDBHf80AOwNMC5Jmtf3F5bQaZNnzFF+h+EhW7 6xj9dyoxQs20+d5s2MFNH1KriWayeubhAqpo5/W9zqikW/VmVPyYs5AVoE1P9A== 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 457B19E606 for ; Wed, 08 Jan 2025 22:54:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0W-00019S-IA; Wed, 08 Jan 2025 16:54:32 -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 1tVe09-0000HY-6V for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54:11 -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 1tVe08-0004Ic-QT; Wed, 08 Jan 2025 16:54:08 -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=rtx6jF9s547Sdf8qK+wTeWLZznPqsY3ur02Ejgc+6M4=; b=bNVVHMgC0OKmMoLSP0O0zdtcWMacWEhxMbAywaMrfnw+x6TzcFQnu3dhfC+dGuKe+ZDjYJ2TRKjWEPV3EjWuFuM7IT/J3eH90yqWYqtQKIAw5hz/sxi6DwVeHIWuwXegfFttAB7p8gV8fj5/b5CKSgphEOcPOXvAkayZ1EByFJsQSlctld2Rx6DDq4K1FbyQQq7EN3Ea4Anlq8Oskm2f2p633XPigcaesQDD1p8Ak5WYeoalMX2yyrfIIfNeXJnA2hZTqQiqlcLT9VoUCTSmuLYmzoMDY578auhlsSsyPuHMixjjMoyeFS9bDh/x5KHCSjnAhg1XXTe1Ky0ahRAtOw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe04-0005Y8-QP; Wed, 08 Jan 2025 16:54:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54:04 +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.173637319721203 (code B ref 74860); Wed, 08 Jan 2025 21:54:04 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:17 +0000 Received: from localhost ([127.0.0.1]:49318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzJ-0005Vp-8r for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55116) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz8-0005Ta-Tp for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:07 -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 1tVdz3-00047K-IK; Wed, 08 Jan 2025 16:53:01 -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=rtx6jF9s547Sdf8qK+wTeWLZznPqsY3ur02Ejgc+6M4=; b=Ok4ktuoXOWCfji+MLhRr /X0LOZgCDUZdtMIjN7CWopA6H68CiU7LEFwu9UNXvVJLhMhDMxl1TAGLVmNPx6ZO1jXrOSNs5Cawu o0/B52HT15Mfs4mA90On1OPyEQZFkWeNGSwVEimIfvlp495FOpT+KyepudnVQzvcpx0FiDYGGc5xK +F8TdI2AIeXADdZnzN6W8EXDL9pizmO75a1HcSrGC2O5dMBJA5ck0vxbNiPkW2HkSPeloljFTWcAo StH9Tms87+P+R8SH+pZeuynRYwoG3rWyW4zZY9tcXjsgz7QGkHlLKYaJZ9LKz4lUkJRZQJzhZUIQS AhBifc4bHHVpZA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:57 +0100 Message-ID: <24304f1ae073bbd8cf2be1f7b79b61413f3a68da.1736373023.git.ludo@gnu.org> 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.98 X-Spam-Score: -3.98 X-Migadu-Queue-Id: 457B19E606 X-Migadu-Scanner: mx10.migadu.com X-TUID: xU9Nwvdw8Arx * 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 7bc1d0b9e5..1b8047585d 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