2021-01-23 17:16:48 +00:00
|
|
|
# Configuration for Gitea instance
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# Gitea configuration
|
|
|
|
services.gitea = {
|
|
|
|
# Enable Gitea and configure for reverse proxy
|
|
|
|
enable = true;
|
|
|
|
httpAddress = "127.0.0.1";
|
|
|
|
httpPort = 3300;
|
2021-01-23 17:33:01 +00:00
|
|
|
domain = "git.alogoulogoi.com";
|
|
|
|
rootUrl = "https://git.alogoulogoi.com/";
|
2021-01-23 17:16:48 +00:00
|
|
|
|
|
|
|
# Private server
|
|
|
|
disableRegistration = true;
|
|
|
|
#useWizard = true; # Needed for first-time building
|
|
|
|
|
|
|
|
# Settings
|
|
|
|
appName = "Horse Codes";
|
|
|
|
lfs.enable = true;
|
|
|
|
dump = {
|
|
|
|
enable = true;
|
|
|
|
interval = "weekly";
|
|
|
|
};
|
|
|
|
log.level = "Info";
|
|
|
|
settings = {
|
|
|
|
"repository" = {
|
|
|
|
DEFAULT_PRIVATE = true;
|
|
|
|
};
|
|
|
|
"ui" = {
|
|
|
|
DEFAULT_THEME = "arc-green";
|
|
|
|
SHOW_USER_EMAIL = false;
|
|
|
|
};
|
|
|
|
"ui.meta" = {
|
|
|
|
AUTHOR = "Horse Codes";
|
|
|
|
DESCRIPTION = "Alogoulogoi Gitea instance";
|
|
|
|
KEYWORDS = "";
|
|
|
|
};
|
|
|
|
"security" = {
|
|
|
|
INSTALL_LOCK = true;
|
|
|
|
};
|
|
|
|
"picture" = {
|
|
|
|
DISABLE_GRAVATAR = true;
|
|
|
|
};
|
|
|
|
"cron.archive_cleanup".ENABLED = false;
|
|
|
|
"cron.sync_external_users".ENABLED = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Configure nginx to forward to the server at the git subdomain
|
|
|
|
services.nginx.virtualHosts."git.alogoulogoi.com" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
extraConfig = ''
|
|
|
|
access_log /var/log/nginx/access.git.log;
|
|
|
|
'';
|
|
|
|
locations."/".extraConfig = ''
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_pass http://localhost:3300/;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|