2016-08-21 12:07:05 +02:00
|
|
|
{pkgs, ...}:
|
|
|
|
|
|
|
|
let
|
2016-09-02 12:48:32 +02:00
|
|
|
daemon-port = 6969;
|
2016-08-21 12:07:05 +02: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 12:48:32 +02:00
|
|
|
|
|
|
|
# allow retiolum:
|
|
|
|
allow_iana_ips=yes
|
2016-08-21 12:07:05 +02:00
|
|
|
announce_interval=1800
|
|
|
|
cleanup_interval=120
|
|
|
|
|
|
|
|
[apiserver]
|
|
|
|
enable=yes
|
|
|
|
|
|
|
|
[logging]
|
2016-09-02 12:48:32 +02:00
|
|
|
filename=/tmp/udpt.log
|
2016-08-21 12:07:05 +02:00
|
|
|
level=warning
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
makefu.udpt = {
|
|
|
|
enable = true;
|
|
|
|
inherit cfgfile;
|
|
|
|
};
|
2016-09-02 12:48:32 +02:00
|
|
|
networking.firewall.extraCommands = ''
|
|
|
|
iptables -A INPUT -i retiolum -p udp --dport ${toString daemon-port} -j ACCEPT
|
|
|
|
'';
|
2016-08-21 12:07:05 +02:00
|
|
|
|
|
|
|
}
|