diff options
author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2025-03-11 20:01:28 +0100 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2025-03-20 09:32:05 +0100 |
commit | 18f956467a7e3e35e21a9b5616025bf33f307ad7 (patch) | |
tree | b3026315bcf49d5133e4b0130e814f5d074b974d | |
parent | 2f204a73036d3f78bb3a8a99833ac69a9efaab7b (diff) | |
download | guix-18f956467a7e3e35e21a9b5616025bf33f307ad7.tar.gz guix-18f956467a7e3e35e21a9b5616025bf33f307ad7.zip |
home: Add home-snuik-service.
* gnu/home/services/messaging.scm (home-snuik-service-type): New variable.
* doc/guix.texi (Messaging Home Services): Document it.
Change-Id: I1e278e7d8ed04efcb1a2ce9e12e69cb6a31a9fa4
-rw-r--r-- | doc/guix.texi | 28 | ||||
-rw-r--r-- | gnu/home/services/messaging.scm | 21 |
2 files changed, 47 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 41211d461d..0adc6f8c65 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -49814,6 +49814,34 @@ znc} for more information. @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 bd2f1bb23f..c871869d45 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 <janneke@gnu.org> +;;; Copyright © 2023, 2025 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,12 +20,17 @@ #: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 @@ (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))))) |