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

57 lines
1.3 KiB
Nix
Raw Normal View History

2023-05-11 14:34:13 +02:00
{ config, pkgs, ... }:
let
cfg = config.services.gitea;
2023-06-07 21:10:31 +02:00
domain = "git.feal.no";
httpPort = 3004;
2023-06-29 23:31:55 +02: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-06-29 23:31:55 +02:00
/* SSH_PORT = sshPort; */
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;
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-06-29 23:31:55 +02:00
/* networking.firewall.allowedTCPPorts = [ httpPort sshPort ]; */
2023-06-07 21:10:31 +02:00
networking.firewall.allowedTCPPorts = [ httpPort ];
2023-05-11 14:34:13 +02:00
}