nixos-config/hosts/voyager/services/gitea.nix

60 lines
1.5 KiB
Nix
Raw Normal View History

2023-08-18 19:02:07 +02:00
{ config, pkgs, lib, ... }:
2023-05-11 14:34:13 +02:00
let
cfg = config.services.gitea;
2023-06-07 21:10:31 +02:00
domain = "git.feal.no";
httpPort = 3004;
2023-12-18 23:17:57 +01:00
#sshPort = 2222;
2023-05-11 14:34:13 +02:00
in {
services.gitea = {
enable = true;
package = pkgs.unstable.gitea;
appName = "felixalbs Gitea";
database = {
type = "postgres";
};
settings = {
2023-06-07 21:10:31 +02:00
server = {
LANDING_PAGE=''"/felixalb"'';
HTTP_PORT = httpPort;
2023-08-18 19:02:07 +02:00
/* SSH_PORT = sshPort; */
2023-06-29 23:31:55 +02:00
SSH_DOMAIN = "voyager.home.feal.no";
2023-06-07 21:10:31 +02:00
DOMAIN = domain;
ROOT_URL = "https://${domain}";
};
2023-05-11 14:34:13 +02:00
service.DISABLE_REGISTRATION = true;
session.COOKIE_SECURE = true;
packages.ENABLED = false;
2023-08-18 19:02:07 +02:00
packages.CHUNKED_UPLOAD_PATH = "${cfg.stateDir}/tmp/package-upload";
2023-05-11 14:34:13 +02:00
oauth2_client = {
ENABLE_AUTO_REGISTRATION = true;
OPENID_CONNECT_SCOPES = "email profile openid";
UPDATE_AVATAR = true;
ACCOUNT_LINKING = "auto";
USERNAME = "email";
};
log.LEVEL = "Info";
database.LOG_SQL = false;
ui = {
THEMES="gitea,arc-green,nord";
DEFAULT_THEME="nord";
};
};
# TODO:
# - dump (automatic backups)
# - configure mailer
};
2023-08-18 19:02:07 +02:00
systemd.services.gitea.serviceConfig.WorkingDirectory = lib.mkForce "/var/lib/gitea/work";
networking.firewall.allowedTCPPorts = [ httpPort ];
/* networking.firewall.allowedTCPPorts = [ httpPort sshPort ]; */
2023-05-11 14:34:13 +02:00
}