From d916ce2ef40e412c361805531eff5966a309da1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Tue, 11 Apr 2017 22:45:41 +0200 Subject: [PATCH] nixos/lighttpd: set $HOME for gitweb sub-service This allows gitweb to expand '~' in /etc/gitconfig. Without a $HOME variable, it fails to list any projects and instead show the text "No such projects found" in the UI. Setting $HOME to the gitweb project root seems like a sensible value. --- nixos/modules/services/web-servers/lighttpd/gitweb.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/web-servers/lighttpd/gitweb.nix b/nixos/modules/services/web-servers/lighttpd/gitweb.nix index f12cc9734465..c8d9836b0b68 100644 --- a/nixos/modules/services/web-servers/lighttpd/gitweb.nix +++ b/nixos/modules/services/web-servers/lighttpd/gitweb.nix @@ -60,7 +60,8 @@ in "/gitweb/" => "${pkgs.git}/share/gitweb/gitweb.cgi" ) setenv.add-environment = ( - "GITWEB_CONFIG" => "${gitwebConfigFile}" + "GITWEB_CONFIG" => "${gitwebConfigFile}", + "HOME" => "${cfg.projectroot}" ) } '';