nixos-config/modules/tailscale/default.nix

20 lines
425 B
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.eboskma.tailscale;
in
{
options.eboskma.tailscale = {
enable = mkEnableOption "tailscale";
nftables = mkEnableOption "nftables";
};
config = mkIf cfg.enable {
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
};
systemd.services.tailscaled.environment = mkIf cfg.nftables { TS_DEBUG_FIREWALL_MODE = "auto"; };
};
}