From patchwork Thu Mar 13 19:11:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 40139 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6637427BBEA; Thu, 13 Mar 2025 19:12:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D239D27BBE2 for ; Thu, 13 Mar 2025 19:12:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tsnyw-0000eU-9o; Thu, 13 Mar 2025 15:12:38 -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 1tsnyV-0000Ys-Bv for guix-patches@gnu.org; Thu, 13 Mar 2025 15:12:19 -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 1tsnyU-0007lR-VH; Thu, 13 Mar 2025 15:12:11 -0400 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=nniq1MfoUXW4NP4Qpx14/+l1gyMbf4lEiQh2FGCQLmM=; b=C5FYzrB3NsSVcxyTvGzHpwhw4IBnIq5tH8akry1/OWZCWpvPhRswbkruHSCbs3sO7pdXeJVcZFHECfFAJu/aDU9RIO7VWS114QPJJoqvWn3yMYirgvilLd+zoncxGCtpMJAGdBaOVoEb6jXHzA+v9LE2k7RJMwx5D/52Beq+jaFZThBt8mQeb+akSXJ4GofdrX1+lMk84HSc/7JB02q4Niny9Pp2GwITTqArle7ZdjdUXLNw8U4/WUAdpGzNvtVjzHBZGY7CKQ3P3UhCb4B6n1YwyYOSnoznGyEh+NQsSrZ7XZvKllGQo5qawECYln8kprZZ/2t4QEP+Z3SjOF+KNw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tsnyM-0007Ie-6n; Thu, 13 Mar 2025 15:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#76963] [PATCH v2 2/2] home: Add home-snuik-service. Resent-From: Janneke Nieuwenhuizen 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: Thu, 13 Mar 2025 19:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76963 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76963@debbugs.gnu.org Cc: 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 76963-submit@debbugs.gnu.org id=B76963.174189309428003 (code B ref 76963); Thu, 13 Mar 2025 19:12:02 +0000 Received: (at 76963) by debbugs.gnu.org; 13 Mar 2025 19:11:34 +0000 Received: from localhost ([127.0.0.1]:58178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tsnxt-0007HU-TH for submit@debbugs.gnu.org; Thu, 13 Mar 2025 15:11:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40672) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tsnxo-0007Gv-TB for 76963@debbugs.gnu.org; Thu, 13 Mar 2025 15:11:29 -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 1tsnxj-0007iI-Ac; Thu, 13 Mar 2025 15:11:23 -0400 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=nniq1MfoUXW4NP4Qpx14/+l1gyMbf4lEiQh2FGCQLmM=; b=b33PlNvPGdQerLNnaCPn kmCPdAUdajROgbwCTdGHZGcWRa8yQvCJteg/cUeZwUljVrbFnyZPfjiYWmowhxjf4LJepH6CEKLGc u2Dwh9v+215v0P3wa++etXH+KX3+n7R15FibowqymQeaCD9Dby3GQgprl/bSCdcgP+AzBIxrKYwlg 0c9mLKr4eVvFCGe/Hrlxufnx4AiXGLOTxei/yJ4s0drsM/zdxZuV/AfN+S+VopTiogtc2WwM4YOTG V956XTcnZl4xsX+ISf7ApupnUkZ6+shqDLI+k2sac/tZz/lXaLaTSP0SEyE3PZUQDTOHpQBzs492P XqgO+RGpOmkPSQ==; From: Janneke Nieuwenhuizen Date: Thu, 13 Mar 2025 20:11:04 +0100 Message-ID: <590a719c16fa369898b4c8bb99a303e5f4324341.1741893001.git.janneke@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/home/services/messaging.scm (home-snuik-service-type): New variable. * doc/guix.texi (Messaging Home Services): Document it. Change-Id: I1e278e7d8ed04efcb1a2ce9e12e69cb6a31a9fa4 --- doc/guix.texi | 28 ++++++++++++++++++++++++++++ gnu/home/services/messaging.scm | 21 +++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 083e561e48c..54e63902fa1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -49771,6 +49771,34 @@ Messaging Home Services @end table @end deftp +@cindex irc-bot +@cindex snuik +The @uref{https://gitlab.com/janneke/snuik, Snuik IRC bot} can be run as +a daemon to aid talking to users that are currently offline. With the +@code{(gnu home services messaging)} service, you can configure Snuik to +run upon login. + +@defvar home-snuik-service-type +This is the type of the Snuik home service, whose value is a +@code{home-snuik-configuration} object. +@end defvar + +You may specify a custom configuration by providing a +@code{snuik-configuration} record, exactly like for +@code{snuik-service-type} and wrapping it in @code{for-home}. Here is +an example of a service and its configuration that you could add to the +@code{services} field of your @code{home-environment}: + +@lisp +(service home-snuik-service-type + (for-home + (snuik-configuration + (server "irc.oftc.net") + (nick "sneek") + (password "snuik is sneeky") + (channels '("#reproducible-builds")))) +@end lisp + @node Media Home Services @subsection Media Home Services diff --git a/gnu/home/services/messaging.scm b/gnu/home/services/messaging.scm index bd2f1bb23f5..c871869d452 100644 --- a/gnu/home/services/messaging.scm +++ b/gnu/home/services/messaging.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; Copyright © 2023, 2025 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,12 +20,17 @@ (define-module (gnu home services messaging) #:use-module (srfi srfi-26) #:use-module (gnu home services) #:use-module (gnu home services shepherd) + #:use-module (gnu packages irc) #:use-module (gnu packages messaging) + #:use-module (gnu services) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) + #:use-module (gnu services messaging) + #:use-module ((gnu system shadow) #:select (account-service-type)) #:use-module (guix records) #:use-module (guix gexp) - #:export (home-znc-configuration + #:export (home-snuik-service-type + home-znc-configuration home-znc-service-type)) ;;; @@ -64,3 +69,15 @@ (define home-znc-service-type (description "Install and configure @command{znc}, an @acronym{IRC, Internet Relay Chat} bouncer, as a Shepherd service."))) + + +;;; +;;; Snuik. +;;; +(define home-snuik-service-type + (service-type + (inherit (system->home-service-type + (remove-service-extensions snuik-service-type + (list account-service-type + activation-service-type)))) + (default-value (for-home (snuik-configuration)))))