From 3c690822e64b7e8ef41e69b0bcf46c7f4f4f1987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 26 Jun 2022 08:28:49 +0100 Subject: [PATCH] fixup static-root-path.patch --- config/workarounds/default.nix | 3 +++ extra/gitea.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 extra/gitea.patch diff --git a/config/workarounds/default.nix b/config/workarounds/default.nix index 2e05b1a5..c5a9ee83 100644 --- a/config/workarounds/default.nix +++ b/config/workarounds/default.nix @@ -87,6 +87,9 @@ in { url = "https://github.com/go-gitea/gitea/releases/download/v1.17.0-rc1/gitea-src-1.17.0-rc1.tar.gz"; sha256 = "sha256-9pu+fsU1rrfa9yOAxnh8tXDmxv4UYo5DP5azhJC0BpQ="; }; + patches = [ + ../../extra/gitea.patch + ]; }); }) ]; diff --git a/extra/gitea.patch b/extra/gitea.patch new file mode 100644 index 00000000..91bf60bc --- /dev/null +++ b/extra/gitea.patch @@ -0,0 +1,13 @@ +diff --git a/modules/setting/setting.go b/modules/setting/setting.go +index 7be0842..f3d01dd 100644 +--- a/modules/setting/setting.go ++++ b/modules/setting/setting.go +@@ -778,7 +778,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) { + OfflineMode = sec.Key("OFFLINE_MODE").MustBool() + DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool() + if len(StaticRootPath) == 0 { +- StaticRootPath = AppWorkPath ++ StaticRootPath = "@data@" + } + StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath) + StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)