gitea: use compressed assets

This commit is contained in:
Motiejus Jakštys 2024-01-17 10:11:13 +02:00
parent aad3da10ab
commit 0170765df5
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
myData,
...
}: {
@ -41,6 +42,7 @@
};
security.LOGIN_REMEMBER_DAYS = 30;
server = {
STATIC_URL_PREFIX = "/static";
ENABLE_GZIP = true;
LANDING_PAGE = "/motiejus";
ROOT_URL = "https://git.jakstys.lt";
@ -73,6 +75,14 @@
caddy = {
virtualHosts."git.jakstys.lt".extraConfig = ''
route /static/assets/* {
uri strip_prefix /static/assets
file_server * {
root ${pkgs.gitea.passthru.data-compressed}/public
precompressed br gzip
}
}
reverse_proxy 127.0.0.1:${toString myData.ports.gitea}
'';
};