Files
Chickadee/modules/headscale.nix
T

38 lines
698 B
Nix
Raw Normal View History

2026-07-29 18:21:26 -04:00
{ config, lib, pkgs, ... }:
{
2026-07-29 21:55:59 -04:00
systemd.services.headscale.environment = {
GODEBUG = "netdns=go";
};
networking.enableIPv6 = false;
environment.etc."headscale/derp.yaml".source = ./derp.yaml;
2026-07-29 18:21:26 -04:00
services.headscale = {
2026-07-29 21:55:59 -04:00
2026-07-29 18:21:26 -04:00
enable = true;
settings = {
server_url = "https://vpn.grasswren.net";
2026-07-29 21:55:59 -04:00
listen_addr = "0.0.0.0:8080";
2026-07-29 18:21:26 -04:00
database.type = "sqlite";
ip_prefixes = [
"100.64.0.0/10"
"fd7a:115c:a1e0::/48"
];
dns = {
2026-07-29 21:55:59 -04:00
magic_dns = true;
base_domain = "vpn";
nameservers.global = [ "1.1.1.1" ];
2026-07-29 18:21:26 -04:00
};
};
};
services.caddy = {
enable = true;
virtualHosts."vpn.grasswren.net".extraConfig = ''
reverse_proxy localhost:8080
'';
};
}