1
0
Fork 0
dotfiles/system/nixos/forgejo.nix

67 lines
1.1 KiB
Nix
Raw Normal View History

2023-09-11 22:05:25 +00:00
{ pkgs, ... }:
let
fqdn = "git.kempkens.io";
in
{
services.gitea = {
enable = true;
package = pkgs.forgejo;
stateDir = "/var/lib/forgejo";
database = {
type = "postgres";
};
lfs.enable = true;
appName = "kempkens.io Forge";
settings = {
server = {
PROTOCOL = "http+unix";
DOMAIN = fqdn;
ROOT_URL = "https://${fqdn}/";
};
service = {
DISABLE_REGISTRATION = true;
};
mailer = {
ENABLED = true;
PROTOCOL = "sendmail";
FROM = "forgejo@mg.kempkens.io";
SENDMAIL_PATH = "${pkgs.system-sendmail}/bin/sendmail";
};
session = {
COOKIE_SECURE = true;
SAME_SITE = "strict";
};
repository = {
DISABLE_HTTP_GIT = true;
};
other = {
SHOW_FOOTER_VERSION = false;
};
};
};
services.nginx.virtualHosts."${fqdn}" = {
quic = true;
http3 = true;
onlySSL = true;
useACMEHost = "kempkens.io";
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://unix:/run/gitea/gitea.sock";
};
};
}