2023-12-20 11:34:47 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.tailscale;
|
|
|
|
in
|
|
|
|
{
|
2024-01-02 22:46:09 +01:00
|
|
|
options.eboskma.tailscale = {
|
|
|
|
enable = mkEnableOption "tailscale";
|
|
|
|
nftables = mkEnableOption "nftables";
|
|
|
|
};
|
2023-12-20 11:34:47 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.tailscale = {
|
|
|
|
enable = true;
|
2024-02-05 11:13:22 +01:00
|
|
|
useRoutingFeatures = "both";
|
2023-12-20 11:34:47 +01:00
|
|
|
};
|
|
|
|
|
2024-02-05 11:13:22 +01:00
|
|
|
systemd.services.tailscaled.environment = mkIf cfg.nftables { TS_DEBUG_FIREWALL_MODE = "auto"; };
|
2023-12-20 11:34:47 +01:00
|
|
|
};
|
|
|
|
}
|