summary refs log tree commit diff
path: root/nixos/modules/services/web-servers/lighttpd/gitweb.nix
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2017-04-11 22:45:41 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-04-11 22:54:31 +0200
commitd916ce2ef40e412c361805531eff5966a309da1d (patch)
treef46559db81e22fd30c20f67925ffd94cfdcc48ad /nixos/modules/services/web-servers/lighttpd/gitweb.nix
parentd55ab1a6b93b28188f3cc136f794325dd9391604 (diff)
downloadnixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.tar
nixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.tar.gz
nixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.tar.bz2
nixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.tar.lz
nixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.tar.xz
nixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.tar.zst
nixpkgs-d916ce2ef40e412c361805531eff5966a309da1d.zip
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.
Diffstat (limited to 'nixos/modules/services/web-servers/lighttpd/gitweb.nix')
-rw-r--r--nixos/modules/services/web-servers/lighttpd/gitweb.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/lighttpd/gitweb.nix b/nixos/modules/services/web-servers/lighttpd/gitweb.nix
index f12cc973446..c8d9836b0b6 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}"
           )
       }
     '';