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.
commitd916ce2ef40e412c361805531eff5966a309da1d
authorBjørn Forsman <bjorn.forsman@gmail.com>
dateTue 11 Apr 2017, 22:45 (10 years ago)
parentd55ab1a
nixos/modules/services/web-servers/lighttpd/gitweb.nix+2−1
@@ -60,7 +60,8 @@ in
6060 "/gitweb/" => "${pkgs.git}/share/gitweb/gitweb.cgi"
6161 )
6262 setenv.add-environment = (
63− "GITWEB_CONFIG" => "${gitwebConfigFile}"
63+ "GITWEB_CONFIG" => "${gitwebConfigFile}",
64+ "HOME" => "${cfg.projectroot}"
6465 )
6566 }
6667 '';