dotfiles/nixos/tailscale.nix

17 lines
381 B
Nix
Raw Normal View History

2021-06-12 16:35:20 +01:00
{ config, pkgs, inputs, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
environment.systemPackages = [ tailscale ];
2021-06-12 15:18:43 +01:00
services.tailscale = {
enable = true;
2021-06-12 16:35:20 +01:00
package = tailscale;
2021-06-12 15:18:43 +01:00
};
2021-06-12 15:07:38 +01:00
networking.firewall = {
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
}