2023-09-14 14:37:55 +03:00
|
|
|
{
|
|
|
|
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 {
|
2023-09-14 14:37:55 +03:00
|
|
|
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";
|
|
|
|
};
|
2023-09-14 14:37:55 +03:00
|
|
|
}
|