configuration.nix/hosts/wynne/services/apps/forgejo.nix

37 lines
817 B
Nix
Raw Normal View History

2024-09-23 20:48:06 +05:30
{ config, lib, ... }:
let
cfg = config.services.forgejo;
domainName = "forge.acomputer.lol";
2024-09-23 20:48:06 +05:30
in
{
services = {
forgejo = {
enable = true;
stateDir = "/mnt/data/Forgejo";
settings = {
database = {
DB_TYPE = lib.mkForce "postgres";
HOST = "127.0.0.1:5432";
USER = cfg.database.user;
NAME = cfg.database.name;
};
server = {
ROOT_URL = "https://${domainName}";
PROTOCOL = "http";
SSH_PORT = 42069;
HTTP_ADDR = "10.10.10.13";
2024-09-23 20:48:06 +05:30
HTTP_PORT = 3000;
DOMAIN = domainName;
};
session = {
COOKIE_SECURE = true;
};
service = {
DISABLE_REGISTRATION = true;
};
};
database.createDatabase = true;
};
};
}