summaryrefslogtreecommitdiffstats
path: root/tv/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-12-02 01:29:07 +0100
committertv <tv@krebsco.de>2019-12-02 01:32:43 +0100
commitbd49cdc29379b17138a95987214b805fdd1f4f63 (patch)
tree645a988493a5b4d79380028fc3080314f3af9e4c /tv/3modules
parent95ec795edaefb5e1ba6b491554de5969b48ccf73 (diff)
tv im: add weechat relay support
Diffstat (limited to 'tv/3modules')
-rw-r--r--tv/3modules/im.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/tv/3modules/im.nix b/tv/3modules/im.nix
index 905b780..8cb1375 100644
--- a/tv/3modules/im.nix
+++ b/tv/3modules/im.nix
@@ -32,6 +32,8 @@ in {
tv.im.server.mosh.enable = lib.mkEnableOption "tv.im.server.mosh" // {
default = true;
};
+ tv.im.server.weechat.relay.enable =
+ lib.mkEnableOption "tv.im.server.weechat.relay";
tv.im.server.user = lib.mkOption {
default = config.krebs.users.tv;
type = lib.types.user;
@@ -93,5 +95,16 @@ in {
"-s ${im.client.host.nets.retiolum.ip6.addr} -p udp --dport 60000:61000 -j ACCEPT"
];
})
+ (lib.mkIf im.server.weechat.relay.enable {
+ krebs.iana-etc.services = {
+ "9001".tcp.name = "weechat-ssl";
+ };
+ tv.iptables.extra4.filter.Retiolum = [
+ "-s ${im.client.host.nets.retiolum.ip4.addr} -p tcp -m tcp --dport 9001 -j ACCEPT"
+ ];
+ tv.iptables.extra6.filter.Retiolum = [
+ "-s ${im.client.host.nets.retiolum.ip6.addr} -p tcp -m tcp --dport 9001 -j ACCEPT"
+ ];
+ })
];
}