nixos/hosts/architect/headscale.nix
Giulio De Pasquale 5d090a32bd fix(headscale.nix): update domain and package reference
- Updated `domain` to use a single string "vipienne.giugl.io"
- Changed `headscalePkg` to use the stable `pkgs.headscale` instead of `pkgs.unstablePkgs.headscale`
- Corrected `base_domain` in `dns_config` to use the updated `domain` variable
2024-11-17 20:30:42 +00:00

47 lines
1.0 KiB
Nix

{ config, pkgs, ... }:
let
domain = "vipienne.giugl.io";
headscalePkg = pkgs.headscale;
in
{
environment.systemPackages = [ headscalePkg ];
architect = {
firewall = {
openUDP = [ config.services.tailscale.port ];
};
vhost.${domain} = {
dnsInterfaces = [ "lan" "tailscale" ];
locations."/" = {
port = config.services.headscale.port;
allowWAN = true;
proxyWebsockets = true;
};
};
};
services.headscale = {
enable = true;
package = headscalePkg;
port = 1194;
settings = {
server_url = "https://${domain}";
log.level = "debug";
dns_config = {
magic_dns = false;
base_domain = domain;
override_local_dns = true;
nameservers = [
config.architect.networks.tailscale.devices.architect.address
];
};
logtail.enabled = false;
ip_prefixes = [ config.architect.networks.tailscale.net ];
noise.private_key_path = "/var/lib/headscale/noise_private.key";
};
};
}