nixos-config/services/gitea.nix

38 lines
802 B
Nix
Executable File

{ config, ... }:
{
services.nginx.virtualHosts."git.skymath.duckdns.org" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:443/";
};
};
services.postgresql = {
ensureDatabases = [ config.services.gitea.user ];
ensureUsers = [
{
name = config.services.gitea.database.user;
ensureDBOwnership = true;
}
];
};
services.gitea = {
enable = true;
appName = "Fallingsky04's Gitea Server <3"; # Give the site a name
database = {
type = "postgres";
passwordFile = "/run/keys/gitea-dbpassword";
};
settings.service = {
REGISTER_MANUAL_CONFIRM = true;
DEFAULT_USER_IS_RESTRICTED = true;
};
settings.server = {
HTTP_PORT = 3001;
};
};
}