You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
{ config, enableSSL, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
baseDomain = "elnu.com";
|
|
|
|
domain = "headscale.${baseDomain}";
|
|
|
|
in {
|
|
|
|
services.headscale = {
|
|
|
|
enable = true;
|
|
|
|
address = "0.0.0.0";
|
|
|
|
port = 8080;
|
|
|
|
settings = {
|
|
|
|
server_url = "https://${domain}";
|
|
|
|
dns_config = {
|
|
|
|
base_domain = baseDomain;
|
|
|
|
domains = [ baseDomain ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
environment.systemPackages = [ config.services.headscale.package ];
|
|
|
|
services.nginx.virtualHosts.${domain} = {
|
|
|
|
forceSSL = enableSSL;
|
|
|
|
enableACME = enableSSL;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:${ toString config.services.headscale.port }";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|