From d310725662af6bcb969dbf290db3816fb2f89e2c Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 25 Nov 2026 21:22:22 +0000 Subject: retiolum-tincr: rename to retiolum --- configs/retiolum-tincr.nix | 55 ---------------------------------------------- configs/retiolum.nix | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 configs/retiolum-tincr.nix create mode 100644 configs/retiolum.nix (limited to 'configs') diff --git a/configs/retiolum-tincr.nix b/configs/retiolum-tincr.nix deleted file mode 100644 index 143d2ca2..00000000 --- a/configs/retiolum-tincr.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, inputs, lib, mylib, pkgs, ... }: let - host = config.krebs.build.host; - net = host.nets.retiolum; -in { - imports = [ - # The module only uses crane for its default package. - (import (inputs.tincr + "/nix/module.nix") { crane = null; }) - ]; - config = lib.mkMerge [ - { - environment.systemPackages = [ - config.services.tincr.package - ]; - services.tincr.package = pkgs.tincr; - services.tincr.networks.retiolum = { - nodeName = host.name; - listenPort = net.tinc.port; - ed25519PrivateKeyFile = - "${config.krebs.secret.directory}/retiolum.ed25519_key.priv"; - hosts = - lib.mapAttrs (_: host: host.nets.retiolum.tinc.config) - (lib.filterAttrs - (_: host: host.nets ? retiolum && host.nets.retiolum.tinc.config or null != null) - config.krebs.hosts); - connectTo = builtins.filter (mylib.ne host.name) [ - "ne" - "neoprism" - "eve" - ]; - interfaceName = "retiolum"; - addresses = [ - "${net.ip4.addr}/${toString net.ip4.prefixLength}" - "${net.ip6.addr}/${toString net.ip6.prefixLength}" - ]; - extraConfig = '' - Broadcast = no - StrictSubnets = yes - ''; - }; - hrm.systemd.services.tincr-retiolum.restartIfCredentialsChange = true; - # tincd doesn't set the MTU. This is what kartei's retiolum module uses, - # measured across the mesh, so paths that lose large packets don't - # stall TCP. - systemd.network.networks."40-tincr-retiolum".linkConfig.MTUBytes = "1377"; - } - (lib.mkIf (!config.hrm.nftables.enable) { - tv.iptables.input-internet-accept-tcp = [ "tinc" ]; - tv.iptables.input-internet-accept-udp = [ "tinc" ]; - }) - (lib.mkIf config.hrm.nftables.enable { - hrm.nftables.input.internet.tcp = [ "tinc" ]; - hrm.nftables.input.internet.udp = [ "tinc" ]; - }) - ]; -} diff --git a/configs/retiolum.nix b/configs/retiolum.nix new file mode 100644 index 00000000..143d2ca2 --- /dev/null +++ b/configs/retiolum.nix @@ -0,0 +1,55 @@ +{ config, inputs, lib, mylib, pkgs, ... }: let + host = config.krebs.build.host; + net = host.nets.retiolum; +in { + imports = [ + # The module only uses crane for its default package. + (import (inputs.tincr + "/nix/module.nix") { crane = null; }) + ]; + config = lib.mkMerge [ + { + environment.systemPackages = [ + config.services.tincr.package + ]; + services.tincr.package = pkgs.tincr; + services.tincr.networks.retiolum = { + nodeName = host.name; + listenPort = net.tinc.port; + ed25519PrivateKeyFile = + "${config.krebs.secret.directory}/retiolum.ed25519_key.priv"; + hosts = + lib.mapAttrs (_: host: host.nets.retiolum.tinc.config) + (lib.filterAttrs + (_: host: host.nets ? retiolum && host.nets.retiolum.tinc.config or null != null) + config.krebs.hosts); + connectTo = builtins.filter (mylib.ne host.name) [ + "ne" + "neoprism" + "eve" + ]; + interfaceName = "retiolum"; + addresses = [ + "${net.ip4.addr}/${toString net.ip4.prefixLength}" + "${net.ip6.addr}/${toString net.ip6.prefixLength}" + ]; + extraConfig = '' + Broadcast = no + StrictSubnets = yes + ''; + }; + hrm.systemd.services.tincr-retiolum.restartIfCredentialsChange = true; + # tincd doesn't set the MTU. This is what kartei's retiolum module uses, + # measured across the mesh, so paths that lose large packets don't + # stall TCP. + systemd.network.networks."40-tincr-retiolum".linkConfig.MTUBytes = "1377"; + } + (lib.mkIf (!config.hrm.nftables.enable) { + tv.iptables.input-internet-accept-tcp = [ "tinc" ]; + tv.iptables.input-internet-accept-udp = [ "tinc" ]; + }) + (lib.mkIf config.hrm.nftables.enable { + hrm.nftables.input.internet.tcp = [ "tinc" ]; + hrm.nftables.input.internet.udp = [ "tinc" ]; + }) + ]; +} -- cgit v1.3.1