summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2024-12-18 09:27:31 +0100
committerMartin Fischer <martin@push-f.com>2024-12-18 09:37:44 +0100
commit86590a9d84602ac529b7b64394d78baca4925455 (patch)
treed265bc99aeed186072471e0eacaa3ccbc34927df
parentd2a7379876196b64fe345f47db2ab91d5315857d (diff)
tente: add headscale
-rw-r--r--nixos/tente-configuration.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tente-configuration.nix b/nixos/tente-configuration.nix
index 459fe87..bef490c 100644
--- a/nixos/tente-configuration.nix
+++ b/nixos/tente-configuration.nix
@@ -101,6 +101,25 @@ in
group = "www-data";
};
+ headscale = {
+ enable = true;
+ port = 8080;
+ # TODO: make dataDir configurable and set it to /srv/
+ settings = {
+ server_url = "https://${domains.tailscaleControlServer}";
+ dns = { base_domain = "tailnet"; };
+ };
+ };
+
+ nginx.virtualHosts.${domains.tailscaleControlServer} = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://localhost:${toString config.services.headscale.port}";
+ proxyWebsockets = true;
+ };
+ };
+
nginx.virtualHosts.${domains.personalWebsite} = {
enableACME = true;
forceSSL = true;