nixos-config/modules/services/server/gitea.nix

76 lines
2.0 KiB
Nix
Raw Normal View History

2022-12-10 17:23:19 +01:00
#
# System notifications
#
{ config, lib, pkgs, ... }:
{
services.gitea = {
enable = true;
2023-01-03 16:52:23 +01:00
dump.enable = true;
rootUrl = "https://git2.kabtop.de"
2022-12-10 17:23:19 +01:00
lfs.enable = true;
httpAdress = "localhost";
dump.type = "tar.xz";
2023-01-03 16:52:23 +01:00
domain = "git2.kabtop.de";
2022-12-10 17:23:19 +01:00
database.type = "postgres";
database.user = "gitea";
database.name = "giteadb"
2023-01-03 16:52:23 +01:00
database.passwordFile = config.age.secrets."services/gitea/databasePassword".path;
2022-12-10 17:23:19 +01:00
appName = "Kabtop Git";
2023-01-03 16:52:23 +01:00
# mailerPasswordFile = config.age.secrets."services/gitea/mailerPassword".path;
2022-12-10 17:23:19 +01:00
settings = {
RUN_MODE = "prod";
server = {
START_SSH_SERVER = true;
2023-01-03 16:52:23 +01:00
SSH_PORT = 2222;
2022-12-10 17:23:19 +01:00
SSH_SERVER_CIPHERS = "";
SSH_SERVER_KEY_EXCHANGES = "";
SSH_SERVER_MACS = "";
ENABLE_GZIP = true;
#LFS_JWT_SECRET = "secret123";
};
security = {
MIN_PASSWORD_LENGTH = 8;
PASSWORD_CHECK_PWN = true;
PASSWORD_HASH_ALGO = "argon2";
};
2023-01-03 16:52:23 +01:00
# oauth2 = {
# ENABLE = true;
# #JWT_SECRET = "secret123";
# };
2022-12-10 17:23:19 +01:00
repository = {
MAX_CREATION_LIMIT = 100;
};
ui = {
SHOW_USER_EMAIL = false;
DEFAULT_THEME = "arc-green";
};
2023-01-03 16:52:23 +01:00
# openid = {
# ENABLE_OPENID_SIGNIN = true;
# WHITELISTED_URIS = "https://auth.kabtop.de";
# };
# oauth2_client = {
# ENABLE_AUTO_REGISTRATION = true;
# };
2022-12-10 17:23:19 +01:00
time = {
DEFAULT_UI_LOCATION = "Europe/Berlin"
};
2023-01-03 16:52:23 +01:00
other = {
SHOW_FOOTER_VERSION = false;
}
2022-12-10 17:23:19 +01:00
session.COOKIE_SECURE = true;
service.DISABLE_REGISTRATION = true;
};
2023-01-03 16:52:23 +01:00
# age.secrets."services/gitea/mailerPassword" = {
# file = ../../../secrets/services/gitea/mailerPassword.age;
# owner = "gitea";
# };
age.secrets."services/gitea/databasePassword" = {
file = ../../../secrets/services/gitea/databasePassword.age;
owner = "gitea";
};
2022-12-10 17:23:19 +01:00
}