This repository has been archived on 2023-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dotfiles/modules/networking/tailscale.nix

21 lines
473 B
Nix

{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.networking.tailscale;
in {
options.modules.networking.tailscale = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
services.tailscale.enable = true;
services.openssh.openFirewall = false;
networking.firewall = {
checkReversePath = "loose";
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
};
}