From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AJ4VBuNq6mOqCwEAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 17:52:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0EjsBONq6mPr9QAAG6o9tA (envelope-from ) for ; Mon, 13 Feb 2023 17:52:51 +0100 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 D308F79CB for ; Mon, 13 Feb 2023 17:52:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRc3i-00088u-2Q; Mon, 13 Feb 2023 11:52:06 -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 1pRc3e-000871-Dq for guix-patches@gnu.org; Mon, 13 Feb 2023 11:52:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRc3e-0005YY-4P for guix-patches@gnu.org; Mon, 13 Feb 2023 11:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRc3d-0003xu-LQ for guix-patches@gnu.org; Mon, 13 Feb 2023 11:52:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61483] [PATCH 3/5] DRAFT gnu: home: services: Add home-znc-service-type. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Feb 2023 16:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61483 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61483@debbugs.gnu.org Cc: Janneke Nieuwenhuizen Received: via spool by 61483-submit@debbugs.gnu.org id=B61483.167630707515157 (code B ref 61483); Mon, 13 Feb 2023 16:52:01 +0000 Received: (at 61483) by debbugs.gnu.org; 13 Feb 2023 16:51:15 +0000 Received: from localhost ([127.0.0.1]:51345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2s-0003wE-1t for submit@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRc2q-0003vl-NP for 61483@debbugs.gnu.org; Mon, 13 Feb 2023 11:51:13 -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 1pRc2k-0005SF-J9; Mon, 13 Feb 2023 11:51:07 -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=az2pukixNgBCZUYN49tZORQllUWue+6Fbt4sNjS8lek=; b=sTWyGsg0nNaQB0CcZtlW SQvHm8X4eL4mehaNOAjPUC2RvYNcHDn1cByBnibxEW5/MjzA3+/5GfRiNg0BFyfhRNtf63shCU+vx WOVv+20SEC6d0AM11uU3LCzgTGkcTHBvwe8qZkJGSvOF6TI0n7nVKMUZZgaOeOr2qI/K79p3DU7uB Is3UStQLyPc9j8Ur922zABbHF3cd+9f3RSmq88VzmU7FoJrFCR4BGonQ5K4IuqsaITbPyXN42EqL7 BxQ+XE07aD6bGo6ArZz/Pa6acWJJ7UwB59NhWPcDs2PqS9QCeAw7k8cpEMtZFrZ7C/YPlBYkiE/7L XXfaJLFTdQeEYg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1pRc2i-0001Mq-BI; Mon, 13 Feb 2023 11:51:04 -0500 From: Janneke Nieuwenhuizen Date: Mon, 13 Feb 2023 17:50:55 +0100 Message-Id: <20230213165057.24518-3-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213165057.24518-1-janneke@gnu.org> References: <20230213165057.24518-1-janneke@gnu.org> MIME-Version: 1.0 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676307170; a=rsa-sha256; cv=none; b=oEtsAORfer0cfXBnrt6EccS9D7eSBVd9QaBTLZ+6R/AK/MQOvUS1AimLBRJj8RfeefArmb Wv7ATCxsTmPj1EVXwODZn78WnTMRHy7+q8YvqpRr26O1Nr6RsFGu4yI/mcUc9dzGHHpNDU vdzJL47tKu2edzK6CAz4Kui25JxBlhi4MghPYho5RRzEz0yFt1eGFNTGjdz3D+PSNEvA3K yKmqN+OeRumit9L6hG3IgSPAyFVdGKEIp8z5q9tZBq0G2uKBbktwjEFELGte2nVr5+0JLM nmDTmm832Drr93eLPh/AbFvW9jtpfgaNHK2ULdMYth5FoLM+9N96jy9JCGPZsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=sTWyGsg0; 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=1676307170; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=Y08gi32NiKOuIYIf7RAnWLrTRy4ad5/FbMdJxc7FRaA=; b=VKIKNTIQmFcaHpAGwNxxPBmKOYbOuhOpekLAGn4Rw8tvHMAuAU+Bv1f/TcJIWzlDHVRJul MOTRc3wGIjn9jLoSnZoF/97ffS0AH/GhVHFH9ZdOurAaFk4Dc4SR1jvk2y6ByP4K0Glk/K h110RkiuKo141kEsUwuxuG8XFZQgiINT+lOjU1gPNGmfkUoQzj264Ns6Mb+wVojymb9ga1 Q69V7Xcf/8lwv+ls2iNVGocsGX8zHgXBRhMG3thufJ3/S9w9b93j/fuka05O2s51hyINmv D5GbOcu70dplxaUBt9PG86v/9rXAYGBiMlqHru71gfbZKbiOByo9Iz8SMDTDDA== X-Migadu-Spam-Score: -2.52 X-Migadu-Scanner: scn1.migadu.com X-Spam-Score: -2.52 X-Migadu-Queue-Id: D308F79CB Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=sTWyGsg0; 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 X-TUID: QoOBxSwQ+Atq From: "Janneke Nieuwenhuizen" * gnu/home/services/shepherd-xyz.scm (): New type. (home-znc-services): New procedure. (home-znc-service-type): New variable. --- gnu/home/services/shepherd-xyz.scm | 43 +++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm index 38ab7d60ef..4f2a2435ac 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -22,6 +22,7 @@ (define-module (gnu home services shepherd-xyz) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages messaging) #:use-module (gnu packages ssh) #:use-module (gnu packages version-control) #:use-module (gnu services configuration) @@ -32,7 +33,9 @@ (define-module (gnu home services shepherd-xyz) #:export (home-git-daemon-configuration home-git-daemon-service-type home-ssh-agent-configuration - home-ssh-agent-service-type)) + home-ssh-agent-service-type + home-znc-configuration + home-znc-service-type)) ;;; Commentary: ;; @@ -156,3 +159,41 @@ (define home-ssh-agent-service-type home-ssh-agent-services))) (description "Install and configure the ssh-agent as a shepherd service."))) + + +;;; +;;; Znc. +;;; +(define-record-type* + home-znc-configuration make-home-znc-configuration + home-znc-configuration? + (znc home-znc-znc ;string + (default #~(string-append #$znc "/bin/znc"))) + (log-dir home-znc-log-dir ;string + (default %user-log-dir))) + +(define (home-znc-services config) + "Return a for znc with CONFIG." + (match config + (($ znc log-dir) + (list (shepherd-service + (documentation "Run the znc IRC bouncer.") + (provision '(znc)) + (start #~(lambda _ + (unless (file-exists? #$log-dir) + (mkdir-p #$log-dir)) + (fork+exec-command + (list #$znc + "--foreground") + #:log-file (string-append #$log-dir "/znc.log")))) + (stop #~(make-kill-destructor))))))) + +(define home-znc-service-type + (service-type + (name 'home-znc) + (default-value (home-znc-configuration)) + (extensions + (list (service-extension home-shepherd-service-type + home-znc-services))) + (description + "Install and configure znc as a shepherd service."))) -- 2.38.1