stockholm/makefu/2configs/udpt.nix

38 lines
612 B
Nix
Raw Normal View History

2016-08-21 10:07:05 +00:00
{pkgs, ...}:
let
2016-09-02 10:48:32 +00:00
daemon-port = 6969;
2016-08-21 10:07:05 +00:00
cfgfile = pkgs.writeText "udpt-config" ''
[db]
driver=sqlite3
param=:memory:
[tracker]
is_dynamic=yes
port=6969
threads=5
allow_remotes=yes
2016-09-02 10:48:32 +00:00
# allow retiolum:
allow_iana_ips=yes
2016-08-21 10:07:05 +00:00
announce_interval=1800
cleanup_interval=120
[apiserver]
enable=yes
[logging]
2016-09-02 10:48:32 +00:00
filename=/tmp/udpt.log
2016-08-21 10:07:05 +00:00
level=warning
'';
in {
makefu.udpt = {
enable = true;
inherit cfgfile;
};
2016-09-02 10:48:32 +00:00
networking.firewall.extraCommands = ''
iptables -A INPUT -i retiolum -p udp --dport ${toString daemon-port} -j ACCEPT
'';
2016-08-21 10:07:05 +00:00
}