diff options
Diffstat (limited to 'hosts/sagittarius/headscale.nix')
| -rw-r--r-- | hosts/sagittarius/headscale.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/hosts/sagittarius/headscale.nix b/hosts/sagittarius/headscale.nix new file mode 100644 index 0000000..4a261c2 --- /dev/null +++ b/hosts/sagittarius/headscale.nix @@ -0,0 +1,28 @@ +{ config, ... }: +let + domain = "headscale.sorre.xyz"; + port = 5892; +in +{ + services.headscale = { + enable = true; + inherit port; + address = "127.0.0.1"; + settings = { + server_url = "https://${domain}"; + dns.base_domain = "sorre.internal"; + dns.nameservers.global = [ "1.1.1.1" "2301:db8:acad:a::1" ]; + }; + }; + + services.nginx.virtualHosts."${domain}" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:${toString port}"; + proxyWebsockets = true; + }; + }; + + environment.systemPackages = [ config.services.headscale.package ]; +} |
