28 lines
479 B
Nix
28 lines
479 B
Nix
|
|
{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 ];
|
||
|
|
|
||
|
|
}
|