stockholm/lass/2configs/retiolum.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
{
2015-10-01 22:13:40 +02:00
krebs.iptables = {
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"; }
];
};
};
krebs.tinc.retiolum = {
enable = true;
connectTo = [
"prism"
"ni"
2022-01-24 17:08:09 +01:00
"eve"
];
2019-05-29 15:40:44 +02:00
extraConfig = ''
2022-05-29 20:05:19 +02:00
AutoConnect = no
2022-01-24 17:08:09 +01:00
StrictSubnets = yes
${lib.optionalString (config.krebs.build.host.nets.retiolum.via != null) ''
LocalDiscovery = no
''}
2019-05-29 15:40:44 +02:00
'';
2022-12-28 20:39:12 +01:00
tincUp = lib.mkIf config.systemd.network.enable "";
};
systemd.network.networks.retiolum = {
matchConfig.Name = "retiolum";
address = [
"${config.krebs.build.host.nets.retiolum.ip4.addr}/16"
"${config.krebs.build.host.nets.retiolum.ip6.addr}/16"
];
};
2016-03-15 14:00:55 +01:00
nixpkgs.config.packageOverrides = pkgs: {
tinc = pkgs.tinc_pre;
};
environment.systemPackages = [
pkgs.tinc
];
}