2023-12-06 06:47:34 +01:00
|
|
|
{ pkgs, config, hostname, ... }: {
|
2023-12-06 06:51:24 +01:00
|
|
|
|
2023-12-06 07:14:59 +01:00
|
|
|
# Set up the secret for the password:
|
|
|
|
sops.secrets."services/forgejo_token" = {
|
2023-12-25 03:00:13 +01:00
|
|
|
owner = "root";
|
|
|
|
mode = "0444"; # gitea-actions-runner uses "DynamicUser"
|
2023-12-06 07:14:59 +01:00
|
|
|
sopsFile = ../../../secrets/secrets.yaml;
|
2023-12-25 03:00:13 +01:00
|
|
|
restartUnits = [ "gitea-actions-runner-${hostname}.service" ];
|
2023-12-06 07:14:59 +01:00
|
|
|
};
|
2023-12-06 06:47:34 +01:00
|
|
|
|
2023-12-25 02:10:46 +01:00
|
|
|
services.gitea-actions-runner = {
|
2023-12-25 05:31:54 +01:00
|
|
|
package = pkgs.gitea-actions-runner;
|
2023-12-25 02:10:46 +01:00
|
|
|
instances."${hostname}" = {
|
|
|
|
enable = true;
|
|
|
|
name = "${hostname}";
|
2023-12-25 05:37:33 +01:00
|
|
|
labels = [ "self-hosted:host://-self-hosted" ];
|
2023-12-25 02:10:46 +01:00
|
|
|
url = "https://git.sysctl.io";
|
2023-12-25 03:11:24 +01:00
|
|
|
tokenFile = /run/secrets/services/forgejo_token;
|
2023-12-25 04:21:40 +01:00
|
|
|
hostPackages = with pkgs; [
|
2023-12-25 04:24:40 +01:00
|
|
|
# Default
|
2023-12-25 04:21:40 +01:00
|
|
|
bash
|
2023-12-25 04:20:11 +01:00
|
|
|
coreutils
|
2023-12-25 04:21:40 +01:00
|
|
|
curl
|
|
|
|
gawk
|
|
|
|
gitMinimal
|
|
|
|
gnused
|
|
|
|
nodejs
|
|
|
|
wget
|
|
|
|
|
2023-12-25 04:24:40 +01:00
|
|
|
# Extras
|
2023-12-25 04:21:40 +01:00
|
|
|
sudo
|
2023-12-25 04:07:35 +01:00
|
|
|
tailscale
|
|
|
|
];
|
2023-12-25 04:07:49 +01:00
|
|
|
};
|
2023-12-06 06:47:34 +01:00
|
|
|
};
|
|
|
|
}
|