63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
|
# 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;
|
||
|
|
||
|
# 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/;
|
||
|
'';
|
||
|
};
|
||
|
}
|
||
|
|