diff options
author | Martin Fischer <martin@push-f.com> | 2024-12-28 10:32:42 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-28 10:48:40 +0100 |
commit | 9ea81efb86ffdb427d3b5a770c00e40c68661d23 (patch) | |
tree | 91aaa3f8756d1fec28f4b0d4288237b10f9dd528 /nixos/hosts/tente/headscale.nix | |
parent | 28424ccb86f9fe02c9e9f95958cf10d3a9fe3777 (diff) |
refactor(tente): declare ports in default.nix
Diffstat (limited to 'nixos/hosts/tente/headscale.nix')
-rw-r--r-- | nixos/hosts/tente/headscale.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/hosts/tente/headscale.nix b/nixos/hosts/tente/headscale.nix index 6faea12..fe7e12b 100644 --- a/nixos/hosts/tente/headscale.nix +++ b/nixos/hosts/tente/headscale.nix @@ -5,6 +5,9 @@ let in { options.headscale = { + port = lib.mkOption { + type = lib.types.int; + }; domain = lib.mkOption { type = lib.types.str; }; @@ -14,7 +17,7 @@ in services = { headscale = { enable = true; - port = 8080; + port = cfg.port; # TODO: make dataDir configurable and set it to /srv/ settings = { server_url = "https://${cfg.domain}"; @@ -26,7 +29,7 @@ in enableACME = true; forceSSL = true; locations."/" = { - proxyPass = "http://localhost:${toString config.services.headscale.port}"; + proxyPass = "http://localhost:${toString cfg.port}"; proxyWebsockets = true; }; }; |