nixcfg/modules/forgejo/default.nix
2025-06-04 02:48:23 -04:00

49 lines
No EOL
983 B
Nix

{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.modules.forgejo;
sshPort = 2222;
httpPort = 5000;
in
{
options = {
modules = {
forgejo = {
enable = mkEnableOption "Deploy forgejo";
};
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [
sshPort
httpPort
];
services.forgejo = {
enable = true;
database = {
type = "sqlite3";
path = "/var/lib/forgejo/forgejo.db";
};
lfs.enable = true;
settings = {
server = {
domain = "git.nekomimi.pet";
ROOT_URL = "https://git.nekomimi.pet";
LANDING_PAGE = "explore";
HTTP_PORT = 5000;
SSH_LISTEN_PORT = 2222;
SSH_PORT = 2222;
START_SSH_SERVER = true;
};
# service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
};
};
};
}