2022-01-27 17:20:53 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2015-07-23 02:11:56 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
|
2015-10-01 22:13:40 +02:00
|
|
|
krebs.iptables = {
|
2015-07-23 02:11:56 +02:00
|
|
|
tables = {
|
2017-09-19 11:51:22 +02:00
|
|
|
filter.INPUT.rules = let
|
|
|
|
tincport = toString config.krebs.build.host.nets.retiolum.tinc.port;
|
|
|
|
in [
|
|
|
|
{ predicate = "-p tcp --dport ${tincport}"; target = "ACCEPT"; }
|
|
|
|
{ predicate = "-p udp --dport ${tincport}"; target = "ACCEPT"; }
|
2015-07-23 02:11:56 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-07-20 17:20:47 +02:00
|
|
|
krebs.tinc.retiolum = {
|
2015-07-23 02:11:56 +02:00
|
|
|
enable = true;
|
|
|
|
connectTo = [
|
2015-10-31 00:12:15 +01:00
|
|
|
"prism"
|
2017-01-12 00:18:43 +01:00
|
|
|
"ni"
|
2022-01-24 17:08:09 +01:00
|
|
|
"eve"
|
2015-07-23 02:11:56 +02:00
|
|
|
];
|
2019-05-29 15:40:44 +02:00
|
|
|
extraConfig = ''
|
2022-01-24 17:08:09 +01:00
|
|
|
StrictSubnets = yes
|
2022-01-27 17:20:53 +01:00
|
|
|
${lib.optionalString (config.krebs.build.host.nets.retiolum.via != null) ''
|
|
|
|
LocalDiscovery = no
|
|
|
|
''}
|
2019-05-29 15:40:44 +02:00
|
|
|
'';
|
2015-07-23 02:11:56 +02:00
|
|
|
};
|
2016-03-15 14:00:55 +01:00
|
|
|
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
|
|
tinc = pkgs.tinc_pre;
|
|
|
|
};
|
2017-05-22 17:22:28 +02:00
|
|
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.tinc
|
|
|
|
];
|
2015-07-23 02:11:56 +02:00
|
|
|
}
|