Enable caching for gitea

This commit is contained in:
Tim Schubert 2021-01-03 18:48:43 +01:00
parent d6a6d87307
commit 42c9150902
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA

View file

@ -1,5 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
redisSocket = "127.0.0.1:6379";
cfg = config.dadada.gitea; cfg = config.dadada.gitea;
in in
{ {
@ -20,6 +21,36 @@ in
type = "postgres"; type = "postgres";
}; };
disableRegistration = true; disableRegistration = true;
settings = {
server = {
LANDING_PAGE = "explore";
OFFLINE_MODE = true;
};
picture = {
DISABLE_GRAVATAR = true;
REPOSITORY_AVATAR_FALLBACK = "random";
ENABLE_FEDERATED_AVATAR = false;
};
other = {
SHOW_FOOTER_BRANDING = false;
SHOW_FOOTER_VERSION = false;
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
};
log = {
DISABLE_ROUTER_LOG = true;
};
cache = {
ENABLE = true;
ADAPTER = "redis";
HOST = "network=tcp,addr=${redisSocket},db=0,pool_size=100,idle_timeout=180";
};
};
};
services.redis = {
enable = true;
vmOverCommit = true;
#unixSocket = redisSocket;
}; };
services.nginx.virtualHosts."git.${config.networking.domain}" = { services.nginx.virtualHosts."git.${config.networking.domain}" = {