1
0
Fork 0
puter/hosts/abacus/headscale.nix

39 lines
868 B
Nix
Raw Normal View History

2025-05-11 22:49:04 +02:00
{ config, ... }:
let
2025-03-30 15:03:46 +00:00
virtualHostName = "headscale.helveticanonstandard.net";
2025-05-11 22:49:04 +02:00
in
{
2025-03-30 15:03:46 +00:00
services.headscale = {
enable = true;
address = "127.0.0.1";
port = 8010;
settings = {
2025-03-30 15:05:55 +00:00
server_url = "https://${virtualHostName}";
2025-06-08 19:35:48 +02:00
dns = {
base_domain = "tailnet.helveticanonstandard.net";
nameservers.global = [
"1.1.1.1"
"1.0.0.1"
"2606:4700:4700::1111"
"2606:4700:4700::1001"
];
};
2025-03-30 15:03:46 +00:00
logtail.enabled = false;
};
};
services.nginx.virtualHosts.${virtualHostName} = {
forceSSL = true;
enableACME = true;
locations."/" = {
2025-05-11 22:49:04 +02:00
proxyPass =
let
host = config.services.headscale.address;
port = builtins.toString config.services.headscale.port;
in
"http://${host}:${port}";
2025-03-30 15:03:46 +00:00
proxyWebsockets = true;
};
};
}