gitea-config.nix 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. { config, pkgs, lib, ... }:
  2. {
  3. services.gitea = {
  4. enable = true;
  5. appName = "binary-it Gitea Service";
  6. user = "gitea";
  7. database = {
  8. type = "postgres";
  9. # todo: find better persistent location for passfile or use derivation
  10. # file needs to be readable by gitea
  11. passwordFile = "/etc/gitea-db-passfile";
  12. user = "gitea";
  13. host = "localhost";
  14. port = 5432;
  15. name = "gitea";
  16. };
  17. domain = "gitea.local";
  18. rootUrl = "http://gitea.local/";
  19. httpPort = 3001;
  20. settings.service = {
  21. REGISTER_EMAIL_CONFIRM = true;
  22. REGISTER_MANUAL_CONFIRM = false;
  23. DISABLE_REGISTRATION = false;
  24. REQUIRE_SIGNIN_VIEW = true;
  25. ENABLE_NOTIFY_MAIL = true;
  26. ALLOW_ONLY_INTERNAL_REGISTRATION = true;
  27. };
  28. settings.repository = {
  29. DEFAULT_BRANCH = "master";
  30. };
  31. settings.mailer = {
  32. ENABLED = true;
  33. MAILER_TYPE = "sendmail";
  34. FROM = "do-not-reply@gitea.local";
  35. SENDMAIL_PATH = "''${pkgs.system-sendmail}/bin/sendmail";
  36. };
  37. settings.openid = {
  38. ENABLE_OPENID_SIGNIN = true;
  39. ENABLE_OPENID_SIGNUP = true;
  40. WHITELISTED_URIS = ''["*keycloak.local*"]'' ;
  41. };
  42. settings.other = {
  43. #SHOW_FOOTER_VERSION = false;
  44. };
  45. };
  46. }