diff options
-rw-r--r-- | modules/private/default.nix | 2 | ||||
-rw-r--r-- | modules/private/irc.nix (renamed from nixops/modules/irc.nix) | 30 | ||||
-rw-r--r-- | nixops/eldiron.nix | 3 | ||||
-rw-r--r-- | nixops/modules/certificates.nix | 1 |
4 files changed, 22 insertions, 14 deletions
diff --git a/modules/private/default.nix b/modules/private/default.nix index a7a23c2..2030315 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix | |||
@@ -9,4 +9,6 @@ | |||
9 | openldap = ./databases/openldap; | 9 | openldap = ./databases/openldap; |
10 | postgresql = ./databases/postgresql.nix; | 10 | postgresql = ./databases/postgresql.nix; |
11 | redis = ./databases/redis.nix; | 11 | redis = ./databases/redis.nix; |
12 | |||
13 | irc = ./irc.nix; | ||
12 | } | 14 | } |
diff --git a/nixops/modules/irc.nix b/modules/private/irc.nix index 363bfef..b3fe91f 100644 --- a/nixops/modules/irc.nix +++ b/modules/private/irc.nix | |||
@@ -1,7 +1,13 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | ||
3 | cfg = config.myServices.irc; | ||
4 | in | ||
2 | { | 5 | { |
3 | options = { | 6 | options.myServices = { |
4 | services.irc.enable = lib.mkOption { | 7 | ircCerts = lib.mkOption { |
8 | description = "Default ircconfigurations for certificates as accepted by acme"; | ||
9 | }; | ||
10 | irc.enable = lib.mkOption { | ||
5 | type = lib.types.bool; | 11 | type = lib.types.bool; |
6 | default = false; | 12 | default = false; |
7 | description = '' | 13 | description = '' |
@@ -10,8 +16,8 @@ | |||
10 | }; | 16 | }; |
11 | }; | 17 | }; |
12 | 18 | ||
13 | config = lib.mkIf config.services.irc.enable { | 19 | config = lib.mkIf cfg.enable { |
14 | security.acme.certs."irc" = config.services.myCertificates.certConfig // { | 20 | security.acme.certs."irc" = config.myServices.ircCerts // { |
15 | domain = "irc.immae.eu"; | 21 | domain = "irc.immae.eu"; |
16 | postRun = '' | 22 | postRun = '' |
17 | systemctl restart stunnel.service | 23 | systemctl restart stunnel.service |
@@ -19,18 +25,18 @@ | |||
19 | }; | 25 | }; |
20 | 26 | ||
21 | networking.firewall.allowedTCPPorts = [ 6697 ]; | 27 | networking.firewall.allowedTCPPorts = [ 6697 ]; |
22 | services.bitlbee = { | 28 | services.bitlbee = with pkgs; { |
23 | enable = true; | 29 | enable = true; |
24 | authMode = "Registered"; | 30 | authMode = "Registered"; |
25 | libpurple_plugins = [ | 31 | libpurple_plugins = [ |
26 | pkgs.purple-hangouts | 32 | purple-hangouts |
27 | pkgs.purple-matrix | 33 | purple-matrix |
28 | ]; | 34 | ]; |
29 | plugins = [ | 35 | plugins = [ |
30 | pkgs.bitlbee-mastodon | 36 | bitlbee-mastodon |
31 | pkgs.bitlbee-facebook | 37 | bitlbee-facebook |
32 | pkgs.bitlbee-discord | 38 | bitlbee-discord |
33 | pkgs.bitlbee-steam | 39 | bitlbee-steam |
34 | ]; | 40 | ]; |
35 | }; | 41 | }; |
36 | 42 | ||
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 | ||