nixos-config/modules/tailscale/default.nix

22 lines
400 B
Nix
Raw Normal View History

2023-12-20 11:34:47 +01:00
{ config, lib, ... }:
with lib;
let
cfg = config.eboskma.tailscale;
in
{
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;
};
systemd.services.tailscaled.environment = mkIf cfg.nftables {
2023-12-20 11:34:47 +01:00
TS_DEBUG_FIREWALL_MODE = "auto";
};
};
}