From 0b26601da8e41a0459db664d925407aec4da852e Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sat, 10 Dec 2022 17:23:19 +0100 Subject: [PATCH] services: initial gitea --- modules/services/server/gitea.nix | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 modules/services/server/gitea.nix diff --git a/modules/services/server/gitea.nix b/modules/services/server/gitea.nix new file mode 100644 index 0000000..7b16d60 --- /dev/null +++ b/modules/services/server/gitea.nix @@ -0,0 +1,72 @@ +# +# System notifications +# + +{ config, lib, pkgs, ... }: + +{ + services.gitea = { + enable = true; + #dump.enable = true; + rootUrl = "https://git.kabtop.de" + lfs.enable = true; + httpAdress = "localhost"; + dump.type = "tar.xz"; + domain = "git.kabtop.de"; + database.type = "postgres"; + database.user = "gitea"; + #database.password = "secret123"; + database.name = "giteadb" + appName = "Kabtop Git"; + settings = { + RUN_MODE = "prod"; + server = { + START_SSH_SERVER = true; + 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"; + }; + oauth2 = { + ENABLE = true; + #JWT_SECRET = "secret123"; + }; + repository = { + MAX_CREATION_LIMIT = 100; + }; + ui = { + SHOW_USER_EMAIL = false; + DEFAULT_THEME = "arc-green"; + }; + openid = { + ENABLE_OPENID_SIGNIN = true; + WHITELISTED_URIS = "https://auth.kabtop.de"; + }; + oauth2_client = { + ENABLE_AUTO_REGISTRATION = true; + }; + mailer = { + ENABLED = true; + SUBJECT_PREFIX = "Kabtop Gitea"; + HOST = "in-v3.mailjet.com:587"; + PROTOCOL = ""; + FROM = '"Kabtop Gitea" '; + USER = "secrest123"; + PASSWD = "secret123"; + MAILER_TYPE = "smtp"; + }; + time = { + DEFAULT_UI_LOCATION = "Europe/Berlin" + }; + + session.COOKIE_SECURE = true; + service.DISABLE_REGISTRATION = true; + }; + +}