From cb20d078360ec9235b9b3a78d7950ded1f601267 Mon Sep 17 00:00:00 2001 From: Emile Date: Tue, 26 Mar 2024 10:30:12 +0100 Subject: ports.nix file containing the used ports in a central location Done and deployed in the 15min train ride to the office, quick and easy! --- nix/hosts/corrino/www/tickets.emile.space.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nix/hosts/corrino/www/tickets.emile.space.nix') diff --git a/nix/hosts/corrino/www/tickets.emile.space.nix b/nix/hosts/corrino/www/tickets.emile.space.nix index f479263..f7d7b94 100644 --- a/nix/hosts/corrino/www/tickets.emile.space.nix +++ b/nix/hosts/corrino/www/tickets.emile.space.nix @@ -6,8 +6,7 @@ # times... sorry let - # pretix_config = config.age.secrets.pretix.path; - + ports = import ../ports.nix; pretix_config = pkgs.writeText "pretix.cfg" '' [pretix] instance_name=tickets.emile.space @@ -57,7 +56,7 @@ in { locations = { "/" = { extraConfig = '' - proxy_pass http://127.0.0.1:8349; + proxy_pass http://127.0.0.1:${toString ports.tickets}; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; @@ -70,7 +69,7 @@ in { pretix = { image = "pretix/standalone:stable"; ports = [ - "127.0.0.1:8349:80" + "127.0.0.1:${toString ports.tickets}:80" ]; volumes = [ "/var/pretix-data:/data" @@ -116,5 +115,4 @@ in { # services.redis.settings.unixsocketperm = "770"; # trace: warning: The option `services.redis.settings' defined in `/nix/store/ib5271hcbjqrxb0yrmrjcypvpacmnp2s-source/ops/modules/www/tickets.emile.space.nix' has been renamed to `services.redis.servers."".settings'. - } -- cgit 1.4.1