aboutsummaryrefslogtreecommitdiff
path: root/modules/private/irc.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/irc.nix')
-rw-r--r--modules/private/irc.nix54
1 files changed, 0 insertions, 54 deletions
diff --git a/modules/private/irc.nix b/modules/private/irc.nix
deleted file mode 100644
index bc0bfb4..0000000
--- a/modules/private/irc.nix
+++ /dev/null
@@ -1,54 +0,0 @@
1{ lib, pkgs, config, ... }:
2let
3 cfg = config.myServices.irc;
4in
5{
6 options.myServices = {
7 ircCerts = lib.mkOption {
8 description = "Default ircconfigurations for certificates as accepted by acme";
9 };
10 irc.enable = lib.mkOption {
11 type = lib.types.bool;
12 default = false;
13 description = ''
14 Whether to enable irc stuff.
15 '';
16 };
17 };
18
19 config = lib.mkIf cfg.enable {
20 security.acme.certs."irc" = config.myServices.ircCerts // {
21 domain = "irc.immae.eu";
22 postRun = ''
23 systemctl restart stunnel.service
24 '';
25 };
26
27 networking.firewall.allowedTCPPorts = [ 6697 ];
28 services.bitlbee = with pkgs; {
29 enable = true;
30 authMode = "Registered";
31 libpurple_plugins = [
32 purple-hangouts
33 purple-matrix
34 ];
35 plugins = [
36 bitlbee-mastodon
37 bitlbee-facebook
38 bitlbee-discord
39 bitlbee-steam
40 ];
41 };
42
43 services.stunnel = {
44 enable = true;
45 servers = {
46 bitlbee = {
47 accept = 6697;
48 connect = 6667;
49 cert = "${config.security.acme.certs.irc.directory}/full.pem";
50 };
51 };
52 };
53 };
54}