1
0
nixfiles/hosts/web-2/gitea.nix

92 lines
2.0 KiB
Nix
Raw Permalink Normal View History

2021-01-06 22:02:11 +01:00
{ ... }:
{
2021-12-12 17:22:43 +01:00
services.gitea = {
2021-01-06 22:02:11 +01:00
enable = true;
appName = "clerie Git";
database = {
createDatabase = false;
type = "postgres";
name = "gitea";
user = "gitea";
socket = "/run/postgresql";
};
lfs.enable = true;
settings = {
2022-09-11 20:07:19 +02:00
log = {
LEVEL = "Info";
};
2021-01-06 22:02:11 +01:00
database = {
CHARSET = "utf8";
};
repository = {
ENABLE_PUSH_CREATE_USER = true;
ENABLE_PUSH_CREATE_ORG = true;
DEFAULT_PRIVATE = true;
};
server = {
ROOT_URL = "https://git.clerie.de/";
DOMAIN = "git.clerie.de";
HTTP_ADDRESS = "127.0.0.1";
HTTP_PORT = 3000;
2021-01-06 22:02:11 +01:00
OFFLINE_MODE = true;
LANDING_PAGE = "explore";
};
mailer = {
enabled = false;
};
service = {
2022-09-11 20:07:19 +02:00
DISABLE_REGISTRATION = true;
2021-01-06 22:02:11 +01:00
REGISTER_EMAIL_CONFIRM = false;
ENABLE_NOTIFY_MAIL = false;
ALLOW_ONLY_EXTERNAL_REGISTRATION = false;
ENABLE_CAPTCHA = false;
REQUIRE_SIGNIN_VIEW = false;
DEFAULT_KEEP_EMAIL_PRIVATE = true;
DEFAULT_ALLOW_CREATE_ORGANIZATION = true;
DEFAULT_ENABLE_TIMETRACKING = false;
};
picture = {
DISABLE_GRAVATAR = true;
ENABLE_FEDERATED_AVATAR = false;
};
openid = {
ENABLE_OPENID_SIGNIN = false;
ENABLE_OPENID_SIGNUP = false;
};
2022-09-11 20:07:19 +02:00
session = {
COOKIE_SECURE = true;
};
indexer = {
REPO_INDEXER_ENABLED = true;
};
2021-01-06 22:02:11 +01:00
};
};
services.postgresql = {
ensureDatabases = [ "gitea" ];
ensureUsers = [
{
name = "gitea";
ensureDBOwnership = true;
2021-01-06 22:02:11 +01:00
}
];
};
services.nginx.virtualHosts = {
"git.clerie.de" = {
enableACME = true;
forceSSL = true;
locations = {
"/" = {
proxyPass = "http://localhost:3000";
};
};
extraConfig = ''
access_log /var/log/nginx/git.clerie.de.log combined_anon;
'';
2021-01-06 22:02:11 +01:00
};
};
}