diff options
| author | Devin Finlinson <devin.finlinson@pm.me> | 2023-11-20 03:24:35 -0700 |
|---|---|---|
| committer | Devin Finlinson <devin.finlinson@pm.me> | 2023-11-20 03:24:35 -0700 |
| commit | 912267079a8eaa6ac1d866ef6e02c1046febbb66 (patch) | |
| tree | 0f5be4476dbc748709641765039f05210d8bbeb3 /modules/nixos/headscale.nix | |
| parent | 29fbd6e057d2308987fee2537bd68a8e6d7727b5 (diff) | |
updated template with modern settings
Diffstat (limited to 'modules/nixos/headscale.nix')
| -rw-r--r-- | modules/nixos/headscale.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/nixos/headscale.nix b/modules/nixos/headscale.nix new file mode 100644 index 0000000..a38008e --- /dev/null +++ b/modules/nixos/headscale.nix @@ -0,0 +1,30 @@ +{config, pkgs, ...}: +let + domain = "wormcar.gay"; + subDomain = "bosco." + "${domain}"; +in { + services = { + headscale = { + enable = true; + address = "0.0.0.0"; + port = 8080; + settings = { + logtail.enabled = false; + serverUrl = "https://${subDomain}"; + dns_config.base_domain = "${domain}"; + }; + }; + + nginx.virtualHosts.${subDomain} = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = + "http://localhost:${toString config.services.headscale.port}"; + proxyWebsockets = true; + }; + }; + }; + + environment.systemPackages = [ config.services.headscale.package ]; +} |
