2021-06-12 16:35:20 +01:00
|
|
|
{ config, pkgs, inputs, ... }:
|
|
|
|
let
|
2021-11-22 19:32:26 +00:00
|
|
|
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
|
2021-06-12 16:35:20 +01:00
|
|
|
|
2021-11-22 19:32:26 +00:00
|
|
|
in
|
|
|
|
{
|
2021-06-12 16:35:20 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|