From 900dca47135dc98cac6eea1922acd346e4e911ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 7 May 2024 15:39:16 +0200 Subject: nixos/bcg: try to fix --- nixos/configurations/lipwig.nix | 2 +- nixos/modules/bcg.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/configurations/lipwig.nix b/nixos/configurations/lipwig.nix index e6ec96a..8b1f3ee 100644 --- a/nixos/configurations/lipwig.nix +++ b/nixos/configurations/lipwig.nix @@ -104,8 +104,8 @@ root = "${pkgs.cgit}/cgit"; locations."/".tryFiles = "$uri @cgit"; locations."@cgit".extraConfig = '' - fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi; fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; + fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi; fastcgi_param PATH_INFO $uri; fastcgi_param QUERY_STRING $args; fastcgi_param HTTP_HOST $server_name; diff --git a/nixos/modules/bcg.nix b/nixos/modules/bcg.nix index 3146c15..ea89e3a 100644 --- a/nixos/modules/bcg.nix +++ b/nixos/modules/bcg.nix @@ -146,14 +146,14 @@ in { envConfig = cfg.environmentFiles != []; finalConfig = if envConfig - then "$RUNTIME_DIRECTORY/bcg.config.yaml" + then "\${RUNTIME_DIRECTORY}/bcg.config.yaml" else configFile; in { description = "BigClown Gateway"; wantedBy = ["multi-user.target"]; wants = ["network-online.target"] ++ lib.optional config.services.mosquitto.enable "mosquitto.service"; after = ["network-online.target"]; - preStart = '' + preStart = mkIf envConfig '' umask 077 ${pkgs.envsubst}/bin/envsubst -i "${configFile}" -o "${finalConfig}" ''; -- cgit v1.2.3