forked from lukas/nixos-config
56 lines
1.8 KiB
Nix
56 lines
1.8 KiB
Nix
{ config, ...}:
|
|
{
|
|
services.forgejo= {
|
|
enable = true;
|
|
lfs.enable = true;
|
|
dump.enable = true;
|
|
settings = {
|
|
service = {
|
|
ENABLE_INTERNAL_SIGNIN = true;
|
|
DISABLE_REGISTRATION = false;
|
|
ALLOW_ONLY_INTERNAL_REGISTRATION = false;
|
|
ENABLE_REGISTRATION = true;
|
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
|
#ENABLE_AUTO_REGISTRATION=true;
|
|
};
|
|
log.level = "Debug";
|
|
pwa = {
|
|
ENABLE_STANDALONE = true;
|
|
};
|
|
server = {
|
|
START_SSH_SERVER = true;
|
|
SSH_PORT = 2223;
|
|
HTTP_ADDR = "127.0.0.1";
|
|
HTTP_PORT = 3000;
|
|
DOMAIN = "git.${config.domain}";
|
|
ROOT_URL = "https://git.${config.domain}/"; # can i have two ROOT_URL ?
|
|
# PROTOCOL = "http";
|
|
#TRUSTED_PROXIES = "100.64.0.1";
|
|
LANDING_PAGE = "login";
|
|
};
|
|
session = {
|
|
PROVIDER = "file";
|
|
COOKIE_SECURE = true;
|
|
};
|
|
security = {
|
|
LOGIN_REMEMBER_DAYS = 10;
|
|
#REVERSE_PROXY_TRUSTED_PROXIES = "100.64.0.1";
|
|
};
|
|
oauth2_client = {
|
|
# Never use auto account linking with this, otherwise users cannot change
|
|
# their new user name and they could potentially overtake other users accounts
|
|
# by setting their email address to an existing account.
|
|
# With "login" linking the user must choose a non-existing username first or login
|
|
# with the existing account to link.
|
|
ACCOUNT_LINKING = "login";
|
|
USERNAME = "nickname";
|
|
# This does not mean that you cannot register via oauth, but just that there should
|
|
# be a confirmation dialog shown to the user before the account is actually created.
|
|
# This dialog allows changing user name and email address before creating the account.
|
|
ENABLE_AUTO_REGISTRATION = false;
|
|
REGISTER_EMAIL_CONFIRM = false;
|
|
UPDATE_AVATAR = true;
|
|
};
|
|
};
|
|
};
|
|
}
|