nixos/services: remove forgejo

This commit is contained in:
Alejandro Soto 2025-08-05 21:43:37 -06:00
parent 263b27cbb2
commit adc44af3a0
No known key found for this signature in database
GPG key ID: A2C4C79764EE8F16
2 changed files with 1 additions and 69 deletions

View file

@ -4,7 +4,5 @@
pkgs,
...
}: {
imports = [
./forgejo
];
imports = [];
}

View file

@ -1,66 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.options.trivium.services.forgejo;
in {
options.trivium.services.forgejo = {
enable = mkEnableOption "forgejo settings";
virtualHost = mkOption {
type = types.string;
description = "Virtualhost to use for nginx's reverse proxy. Usually something like git.<your server>.com";
};
appName = mkOption {
type = types.string;
description = "You guess what this does";
};
disableRegistration = mkOption {
type = types.bool;
default = true;
description = "Turn this off just to create the first admin account";
};
};
config = mkIf cfg.enable {
services = {
nginx = {
virtualHosts."${cfg.virtualHost}" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:9170";
};
};
forgejo = {
enable = true;
lfs.enable = true;
useWizard = false;
settings = {
general.APP_NAME = "${cfg.appName}";
ui.DEFAULT_THEME = "forgejo-dark";
server = {
DOMAIN = "${cfg.virtualHost}";
ROOT_URL = "https://${cfg.virtualHost}";
HTTP_PORT = 9170;
LANDING_PAGE = "explore";
};
service.DISABLE_REGISTRATION = ${cfg.disableRegistration};
actions = {
ENABLED = true;
};
mailer = {
ENABLED = false;
};
};
};
};
};
}