2022-12-09 00:31:56 +00:00
|
|
|
with import ./lib;
|
|
|
|
{ config, pkgs, ... }: {
|
2016-07-20 15:20:47 +00:00
|
|
|
krebs.tinc.retiolum = {
|
2016-02-01 16:32:04 +00:00
|
|
|
enable = true;
|
|
|
|
connectTo = filter (ne config.krebs.build.host.name) [
|
2016-11-10 22:54:09 +00:00
|
|
|
"ni"
|
2016-02-01 16:32:04 +00:00
|
|
|
"prism"
|
2022-03-06 10:54:47 +00:00
|
|
|
"eve"
|
2016-02-01 16:32:04 +00:00
|
|
|
];
|
2017-08-01 10:15:45 +00:00
|
|
|
extraConfig = ''
|
|
|
|
LocalDiscovery = yes
|
|
|
|
'';
|
2016-06-29 23:05:21 +00:00
|
|
|
tincPackage = pkgs.tinc_pre;
|
2022-12-30 19:13:59 +00:00
|
|
|
tincUp = lib.mkIf config.systemd.network.enable "";
|
|
|
|
};
|
|
|
|
systemd.network.networks.retiolum = {
|
|
|
|
matchConfig.Name = "retiolum";
|
|
|
|
address = let
|
|
|
|
inherit (config.krebs.build.host.nets.retiolum) ip4 ip6;
|
|
|
|
in [
|
|
|
|
"${ip4.addr}/${toString ip4.prefixLength}"
|
|
|
|
"${ip6.addr}/${toString ip6.prefixLength}"
|
|
|
|
];
|
2016-02-01 16:32:04 +00:00
|
|
|
};
|
2016-06-29 22:52:35 +00:00
|
|
|
tv.iptables.input-internet-accept-tcp = singleton "tinc";
|
2016-06-29 23:09:39 +00:00
|
|
|
tv.iptables.input-internet-accept-udp = singleton "tinc";
|
2016-02-01 16:32:04 +00:00
|
|
|
}
|