From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eFOADg5S7mO5PwEAbAwnHQ (envelope-from ) for ; Thu, 16 Feb 2023 16:55:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0MGNDQ5S7mNuXgEAG6o9tA (envelope-from ) for ; Thu, 16 Feb 2023 16:55:58 +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 0645A15970 for ; Thu, 16 Feb 2023 16:55:57 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSgbA-0001bq-DV; Thu, 16 Feb 2023 10:55:04 -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 1pSgb9-0001b0-4R for guix-patches@gnu.org; Thu, 16 Feb 2023 10:55:03 -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 1pSgb8-00022F-My for guix-patches@gnu.org; Thu, 16 Feb 2023 10:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSgb8-0007r6-Fw for guix-patches@gnu.org; Thu, 16 Feb 2023 10:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61483] [PATCH v2 3/5] DRAFT gnu: home: services: Add home-znc-service-type. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Feb 2023 15:55:02 +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 Received: via spool by 61483-submit@debbugs.gnu.org id=B61483.167656285130108 (code B ref 61483); Thu, 16 Feb 2023 15:55:02 +0000 Received: (at 61483) by debbugs.gnu.org; 16 Feb 2023 15:54:11 +0000 Received: from localhost ([127.0.0.1]:37440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaI-0007pR-CX for submit@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgaD-0007oT-48 for 61483@debbugs.gnu.org; Thu, 16 Feb 2023 10:54:08 -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 1pSga7-0001pl-TK; Thu, 16 Feb 2023 10:53:59 -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=hB0p3TfSrAjUVBANcBO1gggY14jVh5JP0QxcBCvsizw=; b=a2/rCF0DgWufX5QbVPOp 19a26uJAbK8VmByu+wI2u5pYndASUjgvEle+Ewwf2aOkFhNSVHxu5w6bBINfi1qJ7KoyNWaFM41zU z3NKdx2W8aOgbH4mR+0ahJFOVsc98caOQt449yMFr++rXNNvCwhm/eZorqvuU096B9P3kwzzcyp8x KettEAMRI/7HKkjxqK723U8rIwxRoyrLoK84ao89vwvjlni0QLXIVfrSr0ZRmiV/Db7RqDFD6qxsp /ZsGYJIWZvVlKc3H/APLEH+/6IgaLz5ILA2OtYrLgJ7o0R5Sc/DDyxVarlo/cdBizXFokcuFDWEpk 7Uw8S6zBJdZfkg==; 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 1pSga7-0005sK-Gd; Thu, 16 Feb 2023 10:53:59 -0500 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 16 Feb 2023 16:53:53 +0100 Message-Id: <20230216155355.11106-3-janneke@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> References: <20230216155355.11106-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=1676562958; a=rsa-sha256; cv=none; b=PlJmwBl70xx4HQaoPF+5eIxMt1OYfz72NEEKFCAKZZPQ9B/Z1o7EvNtzJqkb+e8eN2mm6O BtOO5iGrLBypwB+ecewQGHkBwyW0Ktr9NK6cJziQmL9Gnkbvi2Z4z+wIkCJsRys5AS3C49 YOAvIPvJ8TTi/cWZD9R/sHqU0iEODn1z0/8Gb98DvWm42T13nxg64rhHrYvCje6QI2rpDg +Pq1JyePCuMFLxJZ8RFgNzbVaQTyNDm72ao2e4Z/u3aQS9oaw/6H1Uk0ciRTq2O7r3hid8 NYbFYft9F6LyWKT+UK3bsQrWRCV+VvsrQrZHquI++drfyIA3QXGbDStf+x7qng== 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="a2/rCF0D"; 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=1676562958; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=fjLlX/AWFwqnPMGJv5SSWErAx/ZDxlnebBlSk8reqsY=; b=kLaPktFYfYK2dpAUjwbM4GtL3FgKPR2RrLip9AC66q789856Pan6Nkm9mbh6Nj9gcQ7QN8 /XyGE3L2Eo6ul7cnVxy6tAh+VHv/j6wCvaS9qvLatfV5an9m4eFl0kP2Z1DksqUgZh/9pA h90pCTedlbu1eRE9pDkbKCuZtkAa8kLZ1GOv+IVgf3A1w53GNsSQZxuMppGLOyZnMN0Rcp gtqaaoUnobkvxpKAm8pflkC5vOUbPNaGeKhahqW/FBLYsDPYTfoN5LZ+L2zv9oEb64BIQu nlCyyhXR2Yg+R15GuPzpGoDQajrBk+94L3DP/O0/v52z20gju+mQsYPBf+asuw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b="a2/rCF0D"; 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-Migadu-Spam-Score: -1.02 X-Spam-Score: -1.02 X-Migadu-Queue-Id: 0645A15970 X-Migadu-Scanner: scn1.migadu.com X-TUID: s/baRwkoJvjp * 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 75f3770ffc..856a5e7246 100644 --- a/gnu/home/services/shepherd-xyz.scm +++ b/gnu/home/services/shepherd-xyz.scm @@ -25,6 +25,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) @@ -35,7 +36,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: ;; @@ -178,3 +181,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 znc)) + (extra-options home-znc-extra-options ;list of string + (default '()))) + +(define (home-znc-services config) + "Return a for znc with CONFIG." + (match config + (($ znc extra-options) + (let* ((znc (file-append znc "/bin/znc")) + (command `(,znc + "--foreground" + ,@extra-options)) + (log-file (string-append %user-log-dir "/znc.log"))) + (list (shepherd-service + (documentation "Run the znc IRC bouncer.") + (provision '(znc)) + (start #~(make-forkexec-constructor '#$command + #:log-file #$log-file)) + (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