added forgejo runner support

This commit is contained in:
Harry 2024-12-12 15:09:03 +01:00
parent f3db562489
commit 729050b005
2 changed files with 34 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
{
imports = [ ./forgejo-smtp.nix ];
sops.secrets.smtp_address = { };
@ -36,6 +36,30 @@
mailerPasswordFile = config.sops.secrets.smtp_password.path;
};
sops.secrets.forgejo-runner-token = {
owner = "forgejo";
};
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://git.hypervirtual.world";
# Obtaining the path to the runner token file may differ
# tokenFile should be in format TOKEN=<secret>, since it's EnvironmentFile for systemd
tokenFile = config.sops.secrets.forgejo-runner-token.path;
labels = [
"ubuntu-latest:docker://node:16-bullseye"
"ubuntu-22.04:docker://node:16-bullseye"
## optionally provide native execution on the host:
# "native:host"
];
};
};
};
systemd.services.forgejo.preStart = ''
create="${lib.getExe config.services.forgejo.package} admin user create"
$create --admin --email "`cat ${config.sops.secrets.forgejoInitialMail.path}`" --username you --password "`cat ${config.sops.secrets.forgejoInitialPassword.path}`" &>/dev/null || true

9
overlays/ircd-hybrid.nix Normal file
View file

@ -0,0 +1,9 @@
{config, ...}: {
nixpkgs.overlays = [
(self: super: {
ircdHybrid
})
];
}