[headscale] Add headscale

This commit is contained in:
Christian
2023-09-23 11:18:37 +02:00
committed by ctsk
parent a25873d518
commit 1edca624c0
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{config, pkgs, ...}:
let
domain = "enclave.ctsk.dev";
port = 10020;
in {
services.headscale = {
address = "127.0.0.1";
port = port;
settings = {
server_url = "https://${domain}";
};
};
services.nginx.virtualHosts."${domain}" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
locations."/".proxyWebsockets = true;
};
environment.systemPackages = [ pkgs.headscale ];
}