services: gitea fix typos and config

This commit is contained in:
Kabbone 2023-01-03 20:39:57 +01:00
parent 5d2257b239
commit e21be3d473
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
4 changed files with 39 additions and 37 deletions

View File

@ -12,7 +12,7 @@
[ [
./postgresql.nix ./postgresql.nix
#./gitea.nix ./gitea.nix
./nextcloud.nix ./nextcloud.nix
./matrix.nix ./matrix.nix
./coturn.nix ./coturn.nix

View File

@ -8,27 +8,25 @@
services.gitea = { services.gitea = {
enable = true; enable = true;
dump.enable = true; dump.enable = true;
rootUrl = "https://git2.kabtop.de" rootUrl = "https://git2.kabtop.de";
lfs.enable = true; lfs.enable = true;
httpAdress = "localhost"; httpAddress = "localhost";
dump.type = "tar.xz"; dump.type = "tar.xz";
domain = "git2.kabtop.de"; domain = "git2.kabtop.de";
# database.type = "postgres"; database.type = "postgres";
# database.user = "gitea"; database.user = "gitea";
# database.name = "giteadb" database.name = "giteadb"
# database.passwordFile = config.age.secrets."services/gitea/databasePassword".path; database.passwordFile = config.age.secrets."services/gitea/databasePassword".path;
appName = "Kabtop Git"; appName = "Kabtop Git";
# mailerPasswordFile = config.age.secrets."services/gitea/mailerPassword".path; mailerPasswordFile = config.age.secrets."services/gitea/mailerPassword".path;
settings = { settings = {
RUN_MODE = "prod";
server = { server = {
START_SSH_SERVER = true; START_SSH_SERVER = true;
SSH_PORT = 2222; SSH_PORT = 2222;
SSH_SERVER_CIPHERS = ""; # SSH_SERVER_CIPHERS = "";
SSH_SERVER_KEY_EXCHANGES = ""; # SSH_SERVER_KEY_EXCHANGES = "";
SSH_SERVER_MACS = ""; # SSH_SERVER_MACS = "";
ENABLE_GZIP = true; ENABLE_GZIP = true;
#LFS_JWT_SECRET = "secret123";
}; };
security = { security = {
MIN_PASSWORD_LENGTH = 8; MIN_PASSWORD_LENGTH = 8;
@ -54,36 +52,41 @@
# ENABLE_AUTO_REGISTRATION = true; # ENABLE_AUTO_REGISTRATION = true;
# }; # };
time = { time = {
DEFAULT_UI_LOCATION = "Europe/Berlin" DEFAULT_UI_LOCATION = "Europe/Berlin";
}; };
other = { other = {
SHOW_FOOTER_VERSION = false; SHOW_FOOTER_VERSION = false;
} };
session.COOKIE_SECURE = true; session.COOKIE_SECURE = true;
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
}; };
extraConfig = ''
[database]
HOST = 127.0.0.1:5432
'';
};
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"${config.services.gitea.domain}" = { "${config.services.gitea.domain}" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".proxyPass = "http://localhost:3000"; locations."/".proxyPass = "http://localhost:3000";
}; };
}; };
# age.secrets."services/gitea/mailerPassword" = { age.secrets."services/gitea/mailerPassword" = {
# file = ../../../secrets/services/gitea/mailerPassword.age; file = ../../../secrets/services/gitea/mailerPassword.age;
# owner = "gitea"; owner = "gitea";
# }; };
age.secrets."services/gitea/databasePassword" = { age.secrets."services/gitea/databasePassword" = {
file = ../../../secrets/services/gitea/databasePassword.age; file = ../../../secrets/services/gitea/databasePassword.age;
owner = "gitea"; owner = "gitea";
}; };
} }

View File

@ -44,5 +44,4 @@ in
"services/nextcloud/dbpassFile.age".publicKeys = servers ++ users; "services/nextcloud/dbpassFile.age".publicKeys = servers ++ users;
"services/gitea/databasePassword.age".publicKeys = servers ++ users; "services/gitea/databasePassword.age".publicKeys = servers ++ users;
"services/gitea/mailerPassword.age".publicKeys = servers ++ users; "services/gitea/mailerPassword.age".publicKeys = servers ++ users;
"services/gitea/extraConfig.age".publicKeys = servers ++ users;
} }