1 This sets a default value for the tpl directory that works for Nixpkgs.
3 diff --git a/server/web.go b/server/web.go
4 index d024a42..0522d02 100644
7 @@ -10,6 +10,7 @@ import "path/filepath"
13 var layoutTpl *template.Template
14 var mainPageTpl *template.Template
15 @@ -44,7 +45,11 @@ func deriveTemplate(filename string) (*template.Template, error) {
18 func (s *Server) tplFilename(filename string) string {
19 - td := filepath.Join(s.cfg.ConfigDir, "..", "tpl")
20 + ex, err := os.Executable()
24 + td := filepath.Join(filepath.Dir(ex), "..", "share", "tpl")
25 if s.cfg.TplPath != "" {