diff options
| author | Sergio Pastor Pérez <sergio.pastorperez@gmail.com> | 2026-07-25 19:41:21 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-08-21 16:00:23 +0200 |
| commit | 08edc6d5ef72d1fca3088bc6635b6701bcde0b45 (patch) | |
| tree | 10c6237fff303ecb0f6236c3ba4d056e8f1f5375 /gnu/services | |
| parent | bf1f18130f2b54a2bd1e8a57d6dae3a611573ee8 (diff) | |
services: Rewrite 'zulip-irc-bridge-configuration' with 'define-configuration/no-serialization'.
* gnu/services/messaging.scm (zulip-irc-bridge-configuration): Rewrite using
'define-configuration/no-serialization'.
(zulip-irc-bridge-services): Adjust for handling 'maybe-string' types.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #10180
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/messaging.scm | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 017c4048250..0be175d8af2 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm | |||
| @@ -2735,20 +2735,36 @@ point to different things after a reload, such as renewed TLS certificates.") | |||
| 2735 | ;;; Zulip. | 2735 | ;;; Zulip. |
| 2736 | ;;; | 2736 | ;;; |
| 2737 | 2737 | ||
| 2738 | (define-record-type* <zulip-irc-bridge-configuration> | 2738 | (define-configuration/no-serialization zulip-irc-bridge-configuration |
| 2739 | zulip-irc-bridge-configuration make-zulip-irc-bridge-configuration | 2739 | (irc-mirror |
| 2740 | zulip-irc-bridge-configuration? | 2740 | (file-like |
| 2741 | (irc-mirror zulip-irc-bridge-mirror | 2741 | (file-append python-zulip "/bin/zulip-irc-bridge")) |
| 2742 | (default (file-append python-zulip "/bin/zulip-irc-bridge"))) | 2742 | "Path to IRC mirror integration to use for the service.") |
| 2743 | (irc-server zulip-irc-bridge-server) | 2743 | (irc-server |
| 2744 | (channel zulip-irc-bridge-channel) | 2744 | string |
| 2745 | (nick-prefix zulip-irc-bridge-nick-prefix) | 2745 | "The IRC server where the channel to mirror is hosted.") |
| 2746 | (stream zulip-irc-bridge-stream) | 2746 | (channel |
| 2747 | (topic zulip-irc-bridge-topic | 2747 | string |
| 2748 | (default #f)) | 2748 | "The IRC room to mirror.") |
| 2749 | (site zulip-irc-bridge-site) | 2749 | (nick-prefix |
| 2750 | (user zulip-irc-bridge-user) | 2750 | string |
| 2751 | (api-key zulip-irc-bridge-api-key)) | 2751 | "Bot nickname.") |
| 2752 | (stream | ||
| 2753 | string | ||
| 2754 | "The Zulip stream where the mirroring takes place.") | ||
| 2755 | (topic | ||
| 2756 | maybe-string | ||
| 2757 | "The Zulip topic to mirror the IRC room under. Defaults to IRC if not | ||
| 2758 | specified.") | ||
| 2759 | (site | ||
| 2760 | string | ||
| 2761 | "The Zulip server that the IRC bridge integration should operate on.") | ||
| 2762 | (user | ||
| 2763 | string | ||
| 2764 | "The Zulip bot email that the IRC integration service should use.") | ||
| 2765 | (api-key | ||
| 2766 | string | ||
| 2767 | "The API key of the Zulip bot that will send the mirrored messages.")) | ||
| 2752 | 2768 | ||
| 2753 | (define %zulip-accounts | 2769 | (define %zulip-accounts |
| 2754 | (list (user-group | 2770 | (list (user-group |
| @@ -2775,7 +2791,7 @@ point to different things after a reload, such as renewed TLS certificates.") | |||
| 2775 | (string-append "--site=" site) | 2791 | (string-append "--site=" site) |
| 2776 | (string-append "--user=" user) | 2792 | (string-append "--user=" user) |
| 2777 | (string-append "--api-key=" api-key) | 2793 | (string-append "--api-key=" api-key) |
| 2778 | (if topic | 2794 | (if (maybe-value-set? topic) |
| 2779 | (list (string-append "--topic=" topic)) | 2795 | (list (string-append "--topic=" topic)) |
| 2780 | '()))) | 2796 | '()))) |
| 2781 | (log-file "/var/log/zulip-irc-bridge.log")) | 2797 | (log-file "/var/log/zulip-irc-bridge.log")) |
