diff options
| -rw-r--r-- | modules/nixos/headscale.nix | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/modules/nixos/headscale.nix b/modules/nixos/headscale.nix index a4c9308..bde6fae 100644 --- a/modules/nixos/headscale.nix +++ b/modules/nixos/headscale.nix @@ -15,27 +15,32 @@ in { }; }; - nginx.virtualHosts.${subDomain} = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = - "http://localhost:${toString config.services.headscale.port}"; - proxyWebsockets = true; - }; - }; - }; + # nginx.virtualHosts.${subDomain} = { + # forceSSL = true; + # enableACME = true; + # locations."/" = { + # proxyPass = + # "http://localhost:${toString config.services.headscale.port}"; + # proxyWebsockets = true; + # }; + # }; + # }; + + # environment.systemPackages = [ config.services.headscale.package ]; - environment.systemPackages = [ config.services.headscale.package ]; + # security.acme = { + # acceptTerms = true; + # email = "devin.finlinson@pm.me"; + # }; - security.acme = { - acceptTerms = true; + services.caddy = { + enable = true; email = "devin.finlinson@pm.me"; + virtualHosts.${subDomain}.extraConfig = '' + reverse_proxy http://localhost:${toString config.services.headscale.port} + ''; }; - networking.firewall.allowedTCPPorts = [ - 80 - 443 - ]; + networking.firewall.allowedTCPPorts = [ 80 443 ]; } |
