main
 1{
 2  den.aspects.core.tailscale = {
 3    persist = {
 4      directories = [
 5        {
 6          directory = "/var/lib/tailscale";
 7          mode = "0700";
 8        }
 9      ];
10    };
11
12    nixos = {
13      config,
14      pkgs,
15      ...
16    }: {
17      environment.systemPackages = [pkgs.tailscale];
18
19      services.tailscale = {
20        enable = true;
21        extraUpFlags = [
22          "--login-server=https://gate.trin.one"
23          "--accept-dns=true"
24        ];
25      };
26
27      networking.firewall = {
28        trustedInterfaces = [config.services.tailscale.interfaceName];
29        allowedUDPPorts = [config.services.tailscale.port];
30      };
31
32      systemd.network.wait-online.enable = false;
33      boot.initrd.systemd.network.wait-online.enable = false;
34    };
35  };
36}