nixos-hypervisor/services/forgejo-runner/default.nix

32 lines
773 B
Nix
Raw Normal View History

2024-10-23 14:55:37 +02:00
{ config, pkgs, lib, agenix, ... }:
let
cfg = config.services.vm_forgejo;
in
{
options.services.vm_forgejo = {
enable = lib.mkEnableOption "Enable Forgejo service";
};
config = lib.mkIf cfg.enable {
2024-10-23 14:55:37 +02:00
users.users.gitea-runner = {
isNormalUser = true;
};
age.secrets.forgejo-runner-token = {
file = ./secrets/forgejo-runner-token.age;
mode = "0660";
2024-10-23 16:47:14 +02:00
owner = "gitea-runner";
2024-10-23 14:55:37 +02:00
};
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
2024-10-23 14:55:37 +02:00
name = "nixos-runner";
url = "https://git.le43.eu";
tokenFile = config.age.secrets.forgejo-runner-token.path;
labels = [
"native:host"
];
};
};
};
}