From 9ea81efb86ffdb427d3b5a770c00e40c68661d23 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sat, 28 Dec 2024 10:32:42 +0100 Subject: refactor(tente): declare ports in default.nix --- nixos/hosts/tente/headscale.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'nixos/hosts/tente/headscale.nix') 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; }; }; -- cgit v1.2.3