snowflake/hosts/sakura/services/forgejo.nix

62 lines
1.4 KiB
Nix
Raw Normal View History

2023-10-05 14:45:45 -04:00
{
2023-10-05 15:54:57 -04:00
pkgs,
2023-10-05 14:45:45 -04:00
lib,
config,
...
}: {
2023-10-05 14:55:34 -04:00
sops.secrets.forgejo-runner-token = {owner = "forgejo";};
2023-09-16 18:53:50 -04:00
services.forgejo = {
2023-05-28 22:00:50 -04:00
enable = true;
2023-06-18 17:35:31 -04:00
stateDir = "/var/lib/forgejo";
2023-05-28 22:00:50 -04:00
settings = {
2023-09-01 10:32:05 -04:00
service.DISABLE_REGISTRATION = true;
2023-09-16 18:53:50 -04:00
DEFAULT.APP_NAME = "forgejo";
2023-06-18 03:28:27 -04:00
ui = {
DEFAULT_THEME = "forgejo-dark";
};
2023-06-06 00:09:09 -04:00
actions = {
ENABLED = true;
2023-10-05 14:45:45 -04:00
DEFAULT_ACTIONS_URL = "https://code.forgejo.org";
2023-06-06 00:09:09 -04:00
};
2023-05-28 22:00:50 -04:00
server = {
2023-06-11 07:48:54 -04:00
HTTP_PORT = 3200;
2023-05-28 22:00:50 -04:00
DOMAIN = "git.notohh.dev";
2023-10-03 14:24:26 -04:00
ROOT_URL = "https://git.flake.sh";
2023-05-28 22:00:50 -04:00
LANDING_PAGE = "/explore/repos";
};
2023-06-18 17:35:31 -04:00
database = {
DB_TYPE = lib.mkForce "postgres";
HOST = "192.168.1.211:5432";
NAME = "forgejo";
USER = "forgejo";
PASSWD = "forgejo";
};
2023-06-19 12:47:01 -04:00
metrics = {
ENABLED = true;
ENABLED_ISSUE_BY_REPOSITORY = true;
ENABLED_ISSUE_BY_LABEL = true;
};
2023-05-28 22:00:50 -04:00
};
};
2023-10-05 14:45:45 -04:00
services.gitea-actions-runner.instances.main = {
enable = true;
name = config.networking.hostName;
url = "https://git.flake.sh";
2023-10-05 14:55:34 -04:00
token = config.sops.secrets.forgejo-runner-token.path;
2023-10-05 14:45:45 -04:00
labels = [
"debian-latest:docker://node:18-bullseye"
"ubuntu-latest:docker://node:18-bullseye"
#"native:host"
];
2023-10-05 15:54:57 -04:00
hostPackages = with pkgs; [
sudo
bash
curl
coreutils
wget
gitMinimal
wget
];
2023-10-05 14:45:45 -04:00
};
2023-05-28 22:00:50 -04:00
}