tailscale: Set firewall mode when nftables is enabled

This commit is contained in:
Erwin Boskma 2024-01-02 22:46:09 +01:00
parent e59585530e
commit 92edb06f46
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -4,14 +4,17 @@ let
cfg = config.eboskma.tailscale;
in
{
options.eboskma.tailscale = { enable = mkEnableOption "tailscale"; };
options.eboskma.tailscale = {
enable = mkEnableOption "tailscale";
nftables = mkEnableOption "nftables";
};
config = mkIf cfg.enable {
services.tailscale = {
enable = true;
};
systemd.services.tailscaled.environment = {
systemd.services.tailscaled.environment = mkIf cfg.nftables {
TS_DEBUG_FIREWALL_MODE = "auto";
};
};