diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /systems/eldiron/irc.nix | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'systems/eldiron/irc.nix')
-rw-r--r-- | systems/eldiron/irc.nix | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/systems/eldiron/irc.nix b/systems/eldiron/irc.nix new file mode 100644 index 0000000..c48a4b3 --- /dev/null +++ b/systems/eldiron/irc.nix | |||
@@ -0,0 +1,80 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.irc; | ||
4 | in | ||
5 | { | ||
6 | options.myServices = { | ||
7 | irc.enable = lib.mkOption { | ||
8 | type = lib.types.bool; | ||
9 | default = false; | ||
10 | description = '' | ||
11 | Whether to enable irc stuff. | ||
12 | ''; | ||
13 | }; | ||
14 | }; | ||
15 | |||
16 | config = lib.mkIf cfg.enable { | ||
17 | myServices.dns.zones."immae.eu".subdomains.irc = | ||
18 | with config.myServices.dns.helpers; ips servers.eldiron.ips.main; | ||
19 | |||
20 | myServices.chatonsProperties.services.bitlbee = { | ||
21 | file.datetime = "2022-08-27T19:00:00"; | ||
22 | service = { | ||
23 | name = "Bitlbee"; | ||
24 | description = "An IRC to other chat networks gateway"; | ||
25 | logo = "https://www.bitlbee.org/style/logo.png"; | ||
26 | website = "irc.immae.eu"; | ||
27 | status.level = "OK"; | ||
28 | status.description = "OK"; | ||
29 | registration."" = ["MEMBER" "CLIENT"]; | ||
30 | registration.load = "FULL"; | ||
31 | install.type = "PACKAGE"; | ||
32 | }; | ||
33 | software = { | ||
34 | name = "BitlBee"; | ||
35 | website = "https://www.bitlbee.org/"; | ||
36 | license.url = "https://github.com/bitlbee/bitlbee/blob/master/COPYING"; | ||
37 | license.name = "GNU General Public License v2.0"; | ||
38 | version = pkgs.bitlbee.version; | ||
39 | source.url = "https://github.com/bitlbee/bitlbee"; | ||
40 | modules = map (a: a.pname) config.services.bitlbee.plugins | ||
41 | ++ map (a: a.pname) config.services.bitlbee.libpurple_plugins; | ||
42 | }; | ||
43 | }; | ||
44 | security.acme.certs."irc" = { | ||
45 | domain = "irc.immae.eu"; | ||
46 | postRun = '' | ||
47 | systemctl restart stunnel.service | ||
48 | ''; | ||
49 | }; | ||
50 | |||
51 | networking.firewall.allowedTCPPorts = [ 6697 ]; | ||
52 | services.bitlbee = with pkgs; { | ||
53 | enable = true; | ||
54 | authMode = "Registered"; | ||
55 | libpurple_plugins = [ | ||
56 | purple-hangouts | ||
57 | purple-matrix | ||
58 | purple-facebook | ||
59 | purple-googlechat | ||
60 | ]; | ||
61 | plugins = [ | ||
62 | bitlbee-mastodon | ||
63 | bitlbee-facebook | ||
64 | bitlbee-discord | ||
65 | bitlbee-steam | ||
66 | ]; | ||
67 | }; | ||
68 | |||
69 | services.stunnel = { | ||
70 | enable = true; | ||
71 | servers = { | ||
72 | bitlbee = { | ||
73 | accept = 6697; | ||
74 | connect = 6667; | ||
75 | cert = "${config.security.acme.certs.irc.directory}/full.pem"; | ||
76 | }; | ||
77 | }; | ||
78 | }; | ||
79 | }; | ||
80 | } | ||