From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qDcXJ14L0GSHWgEASxT56A (envelope-from ) for ; Sun, 06 Aug 2023 23:06:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cu8YJ14L0GT3SQAA9RJhRA (envelope-from ) for ; Sun, 06 Aug 2023 23:06:38 +0200 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 59A3137B3E for ; Sun, 6 Aug 2023 23:06:38 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ocRSVB7E; 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=1691355998; a=rsa-sha256; cv=none; b=nz4Q18tDLg8GJ3ly1PDVmzWWtwWiYci8t4YJ09o9Jd08fhxLcGoJhYI08q7IMh2dje4ZoD XFWy/tmbvGoPGFXx8zT0XrGLtGdaAFcVra8fCci2JRoYH/TFubl6vNpXp6LUkt9mU1W9PY F6+3yj3zGRpORCD43/Ec7LqPtfPqfcpxzendb5xcPN3S9cqsV6IkK3IuJ6lDuuGU+CmUu4 wyA6e8943qG0/Pojfq96ZUqsCeuVGIa6b5XVvm8n4gbFaU0D8xcEBQw+5yYC3CDXBjJeoD QWySqMozfXbRTd/ZihtD86U6F14ShZFDHUnKAlrn41UXMS2a/4kkAq9Vp6YZrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691355998; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=LqBwwaAW9PDUjU244nctEWf4WIWglETS9vJq2W1i6j4=; b=PuF2evmzYX3EF9y3nbtp6ZdhN598VbEiHp6TD2GH7+zhUuirI8v7TZed2gEVwaXrv/EWbE cyzTgnnhQ07T8fsOtdBOJNtfiBX4vWL/s7t6mAncIo4X1IaAXvYgVOxv81IBQdcCxLwhBr KORCUENjTwcRZfIbejyewXeUShHyAJC71notyg23G8ftTh3NfFwJ6mj3D32yCHfKsjTtCI O4x6c0kDRqZgXsA5u74Q9iMdOQ5/jWPeIal9X/VJ7PHX+y5ZdKXnp3kNar6hppHxEr8BrK SlPNSxD0wATIyHXnoLrzDP4pbZzwtG3MS5iQSffXsO0wg5k++dFjEH6Gn1gQUg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ocRSVB7E; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSkwu-0006PA-MG; Sun, 06 Aug 2023 17:06:04 -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 1qSkwt-0006Om-3G for guix-patches@gnu.org; Sun, 06 Aug 2023 17:06:03 -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 1qSkws-0000yo-OX for guix-patches@gnu.org; Sun, 06 Aug 2023 17:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSkws-0005dU-5i for guix-patches@gnu.org; Sun, 06 Aug 2023 17:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65119] [PATCH 0/8] Sharing service code between Home and System Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Sun, 06 Aug 2023 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65119 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65119@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by submit@debbugs.gnu.org id=B.169135592421617 (code B ref -1); Sun, 06 Aug 2023 21:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Aug 2023 21:05:24 +0000 Received: from localhost ([127.0.0.1]:60099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSkwF-0005cY-Sa for submit@debbugs.gnu.org; Sun, 06 Aug 2023 17:05:24 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSkwB-0005cD-D3 for submit@debbugs.gnu.org; Sun, 06 Aug 2023 17:05:23 -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 1qSkw3-0006Er-NN for guix-patches@gnu.org; Sun, 06 Aug 2023 17:05:11 -0400 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 1qSkw1-0000lb-Un; Sun, 06 Aug 2023 17:05:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=LqBwwaAW9PDUjU244nctEWf4WIWglETS9vJq2W1i6j4=; b=ocRSVB7EU6J5+3 AUq7GvOwJu+HT3EUCEb4B5iW/ZnALF3bZwo+qpJ3CA2mKmBBykBAy8zhrR+KD1yaJoTuzaePn8kHP eTVQQJZmgbKHDJhf4VOka/KoZEKS4MbQALsKcsgo5m3kqNLrjjAcHd8hgWttHPpQctNT7/WIqcBGC b4C4K112DiKU1EbgZL/Jwh18cIARZ6Uj2zcZIuXBU1zMHMgXxeryO1kq/q/Ki2OtBRvrbbOjlS3CC nwWFNygnWIVYaZg8N2wox5y7+qxDx2jQchVppFrjno369tmA9XW/bdkAuPzdO9gw3WfXNxw1MYt6u TBlQvmSsnUZEU88Z8laQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 6 Aug 2023 23:04:54 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 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: -4.35 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 59A3137B3E X-Spam-Score: -4.35 X-TUID: GZsgPxGpB3JH Hello Guix! Some services make as much sense as a System and as a Home service. Two examples that came up recently are Syncthing and dicod: https://issues.guix.gnu.org/63758 https://issues.guix.gnu.org/62401 In these cases, we’d rather avoid code duplication and have a common code base for both the System and the Home service. This patch lets us map System services to Home and uses the new mechanism for three services: mcron, dicod, and syncthing. Feedback welcome! Ludo’. Ludovic Courtès (8): services: dicod: Remove Shepherd < 0.9.0 compatibility layer. services: dicod: Pre-build the GCIDE index. services: syncthing: Use 'match-record'. services: Define 'for-home'. home: services: Support mapping of System services to Home services. home: services: mcron: Define as a mapping of the system service. home: services: Add dicod. home: services: Add Syncthing. doc/guix.texi | 96 ++++++++++++++++++++++++++++++++- gnu/home/services.scm | 69 +++++++++++++++++++++++- gnu/home/services/dict.scm | 32 +++++++++++ gnu/home/services/mcron.scm | 96 ++++----------------------------- gnu/home/services/shepherd.scm | 4 +- gnu/home/services/syncthing.scm | 30 +++++++++++ gnu/local.mk | 2 + gnu/services.scm | 25 ++++++++- gnu/services/dict.scm | 84 ++++++++++++++--------------- gnu/services/mcron.scm | 80 ++++++++++++--------------- gnu/services/syncthing.scm | 56 ++++++++++--------- 11 files changed, 372 insertions(+), 202 deletions(-) create mode 100644 gnu/home/services/dict.scm create mode 100644 gnu/home/services/syncthing.scm base-commit: 0ab46ef3f9719f03d9b191a16e5aa91619e95451 -- 2.41.0