From 880df6560cc644dbe6d721d690cb00c62cd86e11 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 3 Jan 2018 23:21:57 +0100 Subject: [PATCH] fix(nix): Fix Gogs SSH access The Gogs developers got it into their head that trying to write things to some relative path from the binary location is a sensible thing to do (spoiler: it's not). Due to their weird "GOGS_CUSTOM" directory which seems to only sometimes be configurable by environment variables, the command used to handle SSH requests failed because it attempted to write logs into the Nix store. This works around the issue by hardcoding the log file root path in the Gogs configuration. --- nix/tazserve.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/tazserve.nix b/nix/tazserve.nix index f9aee1a57..8fbb950b0 100644 --- a/nix/tazserve.nix +++ b/nix/tazserve.nix @@ -50,6 +50,10 @@ in { cookieSecure = true; domain = "git.tazj.in"; rootUrl = "https://git.tazj.in/"; + extraConfig = '' + [log] + ROOT_PATH = /var/lib/gogs/log + ''; }; # Set up Gemma