nix-config/configs/nixos/forgejo.nix

44 lines
1,012 B
Nix
Raw Normal View History

2024-07-29 22:02:40 +02:00
{
inputs,
config,
pkgs,
lib,
...
}: let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in {
services.forgejo = {
enable = true;
database.type = "sqlite3";
lfs.enable = true;
settings = {
server = {
2024-07-30 05:07:02 +02:00
DOMAIN = "git.venberg.xyz";
2024-07-29 22:02:40 +02:00
ROOT_URL = "https://${srv.DOMAIN}";
HTTP_PORT = 3000;
ENABLE_GZIP = true;
};
service.DISABLE_REGISTRATION = true;
ui.DEFAULT_THEME = "forgejo-dark";
log.LEVEL = "Warn";
"cron.git_gc_repos".ENABLED = true;
"cron.resync_all_sshkeys".ENABLED = true;
"cron.reinit_missing_repos".ENABLED = true;
"cron.delete_old_actions".ENABLED = true;
"cron.delete_old_system_notices".ENABLED = true;
"cron.gc_lfs".ENABLED = true;
};
};
services.nginx.virtualHosts.${srv.DOMAIN} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
};
2024-07-30 22:25:53 +02:00
imports = [./nginx.nix];
2024-07-29 22:02:40 +02:00
}