add: separate config file for Forgejo
This commit is contained in:
parent
df2526551d
commit
c2792ecd53
2 changed files with 46 additions and 44 deletions
|
@ -25,50 +25,7 @@ in {
|
||||||
database.socket = "/run/postgresql";
|
database.socket = "/run/postgresql";
|
||||||
|
|
||||||
secrets.mailer.PASSWD = config.age.secrets.smtpPassword.path;
|
secrets.mailer.PASSWD = config.age.secrets.smtpPassword.path;
|
||||||
settings = {
|
settings = import ./settings.nix { inherit prefs; };
|
||||||
default.APP_NAME = "sador.me Forgejo";
|
|
||||||
"cron.update_checker".ENABLED = false;
|
|
||||||
actions.ENABLED = true;
|
|
||||||
|
|
||||||
service = {
|
|
||||||
DISABLE_REGISTRATION = true;
|
|
||||||
REQUIRE_SIGNIN_VIEW = false;
|
|
||||||
REGISTER_EMAIL_CONFIRM = true;
|
|
||||||
ENABLE_NOTIFY_MAIL = true;
|
|
||||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = false;
|
|
||||||
DEFAULT_KEEP_EMAIL_PRIVATE = false;
|
|
||||||
DEFAULT_ALLOW_CREATE_ORGANIZATION = true;
|
|
||||||
DEFAULT_ENABLE_TIMETRACKING = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
security = {
|
|
||||||
INSTALL_LOCK = true;
|
|
||||||
REVERSE_PROXY_LIMIT = 1;
|
|
||||||
REVERSE_PROXY_TRUSTED_PROXIES = "127.0.0.1";
|
|
||||||
PASSWORD_HASH_ALGO = "pbkdf2";
|
|
||||||
};
|
|
||||||
|
|
||||||
server = {
|
|
||||||
DOMAIN = "git." + prefs.config.thor.domain;
|
|
||||||
ROOT_URL = "https://git." + prefs.config.thor.domain;
|
|
||||||
HTTP_PORT = 3428;
|
|
||||||
DISABLE_SSH = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
mailer = with prefs.config.thor.emailConfig; {
|
|
||||||
ENABLED = true;
|
|
||||||
SMTP_ADDR = server;
|
|
||||||
SMTP_PORT = port;
|
|
||||||
PROTOCOL = "smtp+${tls}";
|
|
||||||
FROM = from;
|
|
||||||
USER = login;
|
|
||||||
};
|
|
||||||
|
|
||||||
ui = {
|
|
||||||
DEFAULT_THEME = "gitea-auto";
|
|
||||||
THEMES = import ./theming.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# setup Catppuccin theme
|
# setup Catppuccin theme
|
||||||
|
|
45
hosts/thor/services/forgejo/settings.nix
Normal file
45
hosts/thor/services/forgejo/settings.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ prefs }: {
|
||||||
|
default.APP_NAME = "${prefs.config.thor.domain} Forgejo";
|
||||||
|
"cron.update_checker".ENABLED = false;
|
||||||
|
actions.ENABLED = true;
|
||||||
|
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
REQUIRE_SIGNIN_VIEW = false;
|
||||||
|
REGISTER_EMAIL_CONFIRM = true;
|
||||||
|
ENABLE_NOTIFY_MAIL = true;
|
||||||
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = false;
|
||||||
|
DEFAULT_KEEP_EMAIL_PRIVATE = false;
|
||||||
|
DEFAULT_ALLOW_CREATE_ORGANIZATION = true;
|
||||||
|
DEFAULT_ENABLE_TIMETRACKING = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
security = {
|
||||||
|
INSTALL_LOCK = true;
|
||||||
|
REVERSE_PROXY_LIMIT = 1;
|
||||||
|
REVERSE_PROXY_TRUSTED_PROXIES = "127.0.0.1";
|
||||||
|
PASSWORD_HASH_ALGO = "pbkdf2";
|
||||||
|
};
|
||||||
|
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git." + prefs.config.thor.domain;
|
||||||
|
ROOT_URL = "https://git." + prefs.config.thor.domain;
|
||||||
|
HTTP_PORT = 3428;
|
||||||
|
DISABLE_SSH = true;
|
||||||
|
ENABLE_PPROF = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
mailer = with prefs.config.thor.emailConfig; {
|
||||||
|
ENABLED = true;
|
||||||
|
SMTP_ADDR = server;
|
||||||
|
SMTP_PORT = port;
|
||||||
|
PROTOCOL = "smtp+${tls}";
|
||||||
|
FROM = from;
|
||||||
|
USER = login;
|
||||||
|
};
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
DEFAULT_THEME = "gitea-auto";
|
||||||
|
THEMES = import ./theming.nix;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue