niksos/hosts/chmura/services/forgejo.nix

34 lines
814 B
Nix

{
config,
...
}: {
services.forgejo = {
enable = true;
lfs.enable = true;
database.type = "postgres";
dump = {
enable = true;
type = "tar.xz";
};
settings = {
DEFAULT = {
APP_NAME = "fuck it we code";
};
server = rec {
DOMAIN = "git.jacekpoz.pl";
HTTP_PORT = 1849;
PROTOCOL = "http";
SSH_PORT = 8236;
ROOT_URL = "${PROTOCOL}://${DOMAIN}/";
};
};
};
services.caddy = {
enable = true;
virtualHosts."git.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}
'';
};
}