mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
forge
This commit is contained in:
parent
f28a1c36b8
commit
2c7530e403
1 changed files with 44 additions and 7 deletions
|
|
@ -1,5 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in
|
||||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
|
|
@ -9,19 +17,48 @@
|
|||
name = "forgejo";
|
||||
socket = "/run/postgresql";
|
||||
};
|
||||
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
HTTP_ADDR = "0.0.0.0";
|
||||
DOMAIN = "git.death916.xyz";
|
||||
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||
HTTP_PORT = 3051;
|
||||
ROOT_URL = "https://git.death916.xyz/";
|
||||
PROTOCOL = "http";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
service.DISABLE_REGISTRATION = false;
|
||||
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "mail.smtp2go.com";
|
||||
FROM = "noreply@${srv.DOMAIN}";
|
||||
USER = "noreply@${srv.DOMAIN}";
|
||||
SMTP_PORT = 465;
|
||||
PROTOCOL = "smtp+starttls";
|
||||
};
|
||||
|
||||
storage = {
|
||||
STORAGE_TYPE = "minio";
|
||||
MINIO_ENDPOINT = "d8j2.or.idrivee2-38.com";
|
||||
MINIO_BUCKET = "forgejo-storage";
|
||||
MINIO_LOCATION = "d8j2";
|
||||
MINIO_USE_SSL = true;
|
||||
};
|
||||
};
|
||||
|
||||
secrets = {
|
||||
mailer.PASSWD = "/etc/nixos/secrets/forgejo-mailer-password";
|
||||
storage.MINIO_ACCESS_KEY_ID = "/etc/nixos/secrets/forgejo-s3-access-key-id";
|
||||
storage.MINIO_SECRET_ACCESS_KEY = "/etc/nixos/secrets/forgejo-s3-secret-access-key";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3051 ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue