From ce0ef8aaacdacd7c90f0d751cc0381ef25fb2fbd Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Sat, 11 Jul 2020 14:33:31 +0100 Subject: add sites.proxyLocationSocket() --- nixos/sites/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nixos/sites') diff --git a/nixos/sites/default.nix b/nixos/sites/default.nix index b2b15e0..bd35924 100644 --- a/nixos/sites/default.nix +++ b/nixos/sites/default.nix @@ -1,6 +1,6 @@ { pkgs, ... }: -{ +rec { catbus-web-ui = pkgs.callPackage ./catbus-web-ui.nix {}; cgit = pkgs.callPackage ./cgit.nix {}; go-packages = pkgs.callPackage ./go-packages.nix {}; @@ -37,9 +37,10 @@ proxySocket = socketPath: { locations = { - "/" = { - proxyPass = "http://unix:/${socketPath}"; - }; + "/" = proxyLocationSocket socketPath; }; }; + proxyLocationSocket = socketPath: { + proxyPass = "http://unix:${socketPath}"; + }; } -- cgit v1.2.3