45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
dn = "git.tfcconnection.org";
|
|
in
|
|
with lib;
|
|
{
|
|
services.forgejo = {
|
|
enable = true;
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "${dn}";
|
|
ROOT_URL = "https://${dn}";
|
|
# PROTOCOL = "https";
|
|
HTTP_PORT = 5000;
|
|
};
|
|
};
|
|
};
|
|
|
|
services.caddy = {
|
|
virtualHosts = {
|
|
"${dn}".extraConfig = ''
|
|
reverse_proxy 127.0.0.1:5000
|
|
encode gzip
|
|
'';
|
|
};
|
|
};
|
|
services.gitea-actions-runner = {
|
|
package = pkgs.forgejo-actions-runner;
|
|
instances.default = {
|
|
enable = true;
|
|
name = "monolith";
|
|
url = "https://git.tfcconnection.org";
|
|
# Obtaining the path to the runner token file may differ
|
|
# tokenFile should be in format TOKEN=<secret>, since it's EnvironmentFile for systemd
|
|
token = "RP4DUN8EPbonAvl0TzQyco4iA5eXY5QYNc4btuzZ";
|
|
labels = [
|
|
"ubuntu-latest:docker://node:16-bullseye"
|
|
## optionally provide native execution on the host:
|
|
"native:host"
|
|
];
|
|
};
|
|
};
|
|
}
|