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-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;
|
|
|
|
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-07 21:10:31 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ httpPort ];
|
2023-05-11 14:34:13 +02:00
|
|
|
}
|