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
|
|
|
|
|
|
|
#useWizard = true; # Needed for first-time building
|
|
|
|
|
|
|
|
# Settings
|
|
|
|
appName = "Horse Codes";
|
|
|
|
lfs.enable = true;
|
|
|
|
dump = {
|
|
|
|
enable = true;
|
|
|
|
interval = "weekly";
|
|
|
|
};
|
|
|
|
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;
|
|
|
|
};
|
2023-06-09 20:27:03 +00:00
|
|
|
"session" = {
|
|
|
|
SESSION_LIFE_TIME = 86400 * 7; # 1 week
|
|
|
|
};
|
2021-01-23 17:16:48 +00:00
|
|
|
"picture" = {
|
|
|
|
DISABLE_GRAVATAR = true;
|
|
|
|
};
|
|
|
|
"cron.archive_cleanup".ENABLED = false;
|
|
|
|
"cron.sync_external_users".ENABLED = false;
|
2022-12-11 00:00:55 +00:00
|
|
|
log.LEVEL = "Info";
|
|
|
|
# Private server
|
|
|
|
service.DISABLE_REGISTRATION = true;
|
2022-12-13 22:07:59 +00:00
|
|
|
# Disable package manager functionality
|
|
|
|
packages.ENABLED = false;
|
2021-01-23 17:16:48 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-02 20:58:05 +00:00
|
|
|
users.users.gitea.openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCYr3Y4waQA4Qb9Vv29APxqkAE6E8KSoTcK1L+NSKOEAb3IxlqitMMnDFfWENXuQlEkkxkqszGA3oe2uchN89UckBFIkm8oEBNE2ZQ0SnuVv+ETHRYMmGvhfOnsnEzpD/j6qSk/0/ea2eJpzfUazMVNTDP7aX6pI0F0n6lXFty0vVan/gN6lM41aNatlQPGxY2XDJQ/e2IJJeOubb2YwH/Vj7/t25yuKiQ5AmaX9fVheM4xA1xfNTs42UfoHzU7Pk3gT6D6L1DGHjsbO0FD4lKPe030XYcPVvpqSiEKGTAYvcWnPH/RDXuz6cEQpN3kMajEtvKUcu0FM/3NPJhvUuxEX0wJnvPPRuY30tcD2WuYemQjm5OCGewdIr1a7mMJ/5zEAzRq4AttEdw7PtTjoj8O+0S6pFrFnv6Dp5TOrg9jyRLICEv7SPb76OhPWWr2uf3TllfXJcQMdsEd3gnTxaUUgJRmD3hfAQO5fOR0MFuVw+bVgleeYctBCW5UjbWZqE1lzEU8xwVYKB05HnWI5tgeh/pkdjg9AfdWnuVU7EljJ8nFEevNTJEe3kjZ67l+wL/dLiyyQuMIq1oBpcOCq+ew0jWZMfPq3o5r13qsdPkUuqdwWOXhCQtqOHHYXVgFEvEGLWacdgHSIFlP7IdfW1M4k1yFPBUlJUU9Bo+VGSZxSw== tvb@catacomb"
|
|
|
|
];
|
|
|
|
|
2021-01-23 17:16:48 +00:00
|
|
|
# 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/;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|