{ config, lib, ... }:

let
  network = import ./network.nix;

  ifname = "ts0";
in
{
  architect.firewall.openUDP = [ config.services.tailscale.port ];

  services = {
    tailscale = {
      enable = true;
      interfaceName = ifname;
    };
  };

  networking.extraHosts = ''
    ${network.architect-ts} architect.devs.giugl.io
    ${network.giuliopc-ts} kmerr.devs.giugl.io
    ${network.dodino-ts} dodino.devs.giugl.io
    ${network.giuliophone-ts} chuck.devs.giugl.io
  '';
}