networking options completed

This commit is contained in:
2026-07-05 22:44:38 -05:00
parent bdba9806ec
commit 5a12201ce7
6 changed files with 151 additions and 89 deletions
+26 -22
View File
@@ -1,25 +1,29 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.homelab.networking.tailscale;
in
{
services.tailscale = {
enable = true;
openFirewall = true;
extraSetFlags = [ "--operator=river" ];
config = lib.mkIf cfg.enable {
services.tailscale = {
enable = true;
openFirewall = true;
extraSetFlags = [ "--operator=${cfg.user}" ];
};
networking.firewall = {
trustedInterfaces = [ config.services.tailscale.interfaceName ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
systemd.services.tailscaled.serviceConfig.Environment = [
"TS_DEBUG_FIREWALL_MODE=nftables"
];
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
users.users.${cfg.user}.extraGroups = [
"tailscale"
];
};
networking.firewall = {
trustedInterfaces = [ config.services.tailscale.interfaceName ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
systemd.services.tailscaled.serviceConfig.Environment = [
"TS_DEBUG_FIREWALL_MODE=nftables"
];
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
users.users.river.extraGroups = [
"tailscale"
];
}