config/modules/services/tailscale/default.nix

27 lines
658 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
myData,
...
}: {
options.mj.services.tailscale = with lib.types; {
enable = lib.mkEnableOption "Enable tailscale";
# https://github.com/tailscale/tailscale/issues/1548
silenceLogs = lib.mkOption {
type = bool;
default = false;
};
};
config = with config.mj.services.tailscale;
2023-09-14 14:51:36 +03:00
lib.mkIf enable {
services.tailscale.enable = true;
2023-09-14 14:48:54 +03:00
networking.firewall.checkReversePath = "loose";
2023-09-14 14:51:36 +03:00
networking.firewall.allowedUDPPorts = [myData.ports.tailscale];
#}
#// lib.mkIf silenceLogs {
# systemd.services.tailscaled.serviceConfig."StandardOutput" = "null";
};
}