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 --- flake.lock | 18 +++++++++--------- nixos/configurations/lipwig.nix | 2 +- nixos/modules/bcg.nix | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 11ff7c2..0774e52 100644 --- a/flake.lock +++ b/flake.lock @@ -259,11 +259,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1714637027, - "narHash": "sha256-NykJkVlRjP7Rz4zMuibGtjFuGGBlneZ+53oWV9Lktik=", + "lastModified": 1715089065, + "narHash": "sha256-TKPO7SsLY29wJjuyMUrei8XA57WFboneSCE8AplTDvg=", "owner": "cynerd", "repo": "nixosdeploy", - "rev": "26e8b7e5b9a5310efcd50a8f94e0f40c4f4ddab7", + "rev": "a5b8a06f5bab1d1a5cbd0f732bcddfac914b1448", "type": "gitlab" }, "original": { @@ -274,11 +274,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1714979072, - "narHash": "sha256-OfShHRR4QmVwEof1EWuZUygw/SFnmxfHogtCKc4vNRM=", + "lastModified": 1715010655, + "narHash": "sha256-FmdhvR/hgBkPDvIv/HOEIQsSMaVXh8wvTrnep8dF3Jc=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "8a4adfe48b68b50ef62e9a299898093436269b6d", + "rev": "d1659c9eb8af718118fb4bbe2c86797c8b8623eb", "type": "github" }, "original": { @@ -693,11 +693,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1714347288, - "narHash": "sha256-jx3B+0TTcp+EDtrbOZgt3D3Rm2ReMmAI34WSTv/pZq8=", + "lastModified": 1714936999, + "narHash": "sha256-8qk2EwvAjpkYaJYo5Sm7CK4jmr+aF7gXog+B4cCXHsc=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "07e03c5f039ee02579124ea331393dcde562ba34", + "rev": "70d5aec44b907a50c5a5fdcd234fc7891f130478", "type": "github" }, "original": { 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