aboutsummaryrefslogtreecommitdiff
path: root/nixops
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-17 01:53:31 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-17 01:53:31 +0200
commitffb14c1c25280777f5db3d2129c48dd319381f65 (patch)
treee17bbe7701a38ff5afbd6ebbe7a597c72d1539f3 /nixops
parent9ade8f6eb774dc7d19d82a070199b5024786b819 (diff)
downloadNix-ffb14c1c25280777f5db3d2129c48dd319381f65.tar.gz
Nix-ffb14c1c25280777f5db3d2129c48dd319381f65.tar.zst
Nix-ffb14c1c25280777f5db3d2129c48dd319381f65.zip
Move irc services to modules
Diffstat (limited to 'nixops')
-rw-r--r--nixops/eldiron.nix3
-rw-r--r--nixops/modules/certificates.nix1
-rw-r--r--nixops/modules/irc.nix48
3 files changed, 2 insertions, 50 deletions
diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix
index 37f901e..a0c5c7c 100644
--- a/nixops/eldiron.nix
+++ b/nixops/eldiron.nix
@@ -41,14 +41,13 @@
41 ./modules/ftp.nix 41 ./modules/ftp.nix
42 ./modules/pub 42 ./modules/pub
43 ./modules/task 43 ./modules/task
44 ./modules/irc.nix
45 ./modules/buildbot 44 ./modules/buildbot
46 ./modules/dns.nix 45 ./modules/dns.nix
47 ] ++ (builtins.attrValues (import ../modules)); 46 ] ++ (builtins.attrValues (import ../modules));
48 myServices.databases.enable = true; 47 myServices.databases.enable = true;
48 myServices.irc.enable = true;
49 services.myGitolite.enable = true; 49 services.myGitolite.enable = true;
50 services.pure-ftpd.enable = true; 50 services.pure-ftpd.enable = true;
51 services.irc.enable = true;
52 services.pub.enable = true; 51 services.pub.enable = true;
53 services.myTasks.enable = true; 52 services.myTasks.enable = true;
54 services.buildbot.enable = true; 53 services.buildbot.enable = true;
diff --git a/nixops/modules/certificates.nix b/nixops/modules/certificates.nix
index 72896fd..43f6a23 100644
--- a/nixops/modules/certificates.nix
+++ b/nixops/modules/certificates.nix
@@ -17,6 +17,7 @@
17 config = { 17 config = {
18 services.websitesCerts = config.services.myCertificates.certConfig; 18 services.websitesCerts = config.services.myCertificates.certConfig;
19 myServices.databasesCerts = config.services.myCertificates.certConfig; 19 myServices.databasesCerts = config.services.myCertificates.certConfig;
20 myServices.ircCerts = config.services.myCertificates.certConfig;
20 21
21 security.acme.preliminarySelfsigned = true; 22 security.acme.preliminarySelfsigned = true;
22 23
diff --git a/nixops/modules/irc.nix b/nixops/modules/irc.nix
deleted file mode 100644
index 363bfef..0000000
--- a/nixops/modules/irc.nix
+++ /dev/null
@@ -1,48 +0,0 @@
1{ lib, pkgs, config, myconfig, ... }:
2{
3 options = {
4 services.irc.enable = lib.mkOption {
5 type = lib.types.bool;
6 default = false;
7 description = ''
8 Whether to enable irc stuff.
9 '';
10 };
11 };
12
13 config = lib.mkIf config.services.irc.enable {
14 security.acme.certs."irc" = config.services.myCertificates.certConfig // {
15 domain = "irc.immae.eu";
16 postRun = ''
17 systemctl restart stunnel.service
18 '';
19 };
20
21 networking.firewall.allowedTCPPorts = [ 6697 ];
22 services.bitlbee = {
23 enable = true;
24 authMode = "Registered";
25 libpurple_plugins = [
26 pkgs.purple-hangouts
27 pkgs.purple-matrix
28 ];
29 plugins = [
30 pkgs.bitlbee-mastodon
31 pkgs.bitlbee-facebook
32 pkgs.bitlbee-discord
33 pkgs.bitlbee-steam
34 ];
35 };
36
37 services.stunnel = {
38 enable = true;
39 servers = {
40 bitlbee = {
41 accept = 6697;
42 connect = 6667;
43 cert = "${config.security.acme.directory}/irc/full.pem";
44 };
45 };
46 };
47 };
48}