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.
This commit is contained in:
Bjørn Forsman 2017-04-11 22:45:41 +02:00
parent d55ab1a6b9
commit d916ce2ef4

View File

@ -60,7 +60,8 @@ in
"/gitweb/" => "${pkgs.git}/share/gitweb/gitweb.cgi"
)
setenv.add-environment = (
"GITWEB_CONFIG" => "${gitwebConfigFile}"
"GITWEB_CONFIG" => "${gitwebConfigFile}",
"HOME" => "${cfg.projectroot}"
)
}
'';