2021-06-12 16:35:20 +01:00
|
|
|
{ config, pkgs, inputs, ... }:
|
|
|
|
let
|
2022-05-02 09:59:47 +01:00
|
|
|
inherit (inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux") tailscale;
|
2021-06-12 16:35:20 +01:00
|
|
|
|
2022-03-10 12:25:23 +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 ];
|
|
|
|
};
|
|
|
|
}
|