Try Forgejo actions
Some checks failed
/ test (push) Has been cancelled

This commit is contained in:
Théo Barnouin 2024-10-23 14:55:37 +02:00
parent 72bb47abe3
commit 139d038452
4 changed files with 17 additions and 3 deletions

View file

@ -0,0 +1,6 @@
on: [push]
jobs:
test:
runs-on: docker
steps:
- run: echo All Good

View file

@ -10,5 +10,6 @@ let
in in
{ {
"forgejo-runner-token.age".publicKeys = [ tbarnouin forgejo ]; "forgejo-runner-token.age".publicKeys = [ tbarnouin forgejo ];
"../services/forgejo-runner/secrets/forgejo-runner-token.age".publicKeys = [ tbarnouin forgejo ];
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, agenix, ... }:
let let
cfg = config.services.vm_forgejo; cfg = config.services.vm_forgejo;
in in
@ -7,12 +7,19 @@ in
enable = lib.mkEnableOption "Enable Forgejo service"; enable = lib.mkEnableOption "Enable Forgejo service";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets.forgejo-runner-token.file = ./secrets/forgejo-runner-token.age; users.users.gitea-runner = {
isNormalUser = true;
};
age.secrets.forgejo-runner-token = {
file = ./secrets/forgejo-runner-token.age;
mode = "0660";
owner = "root";
};
services.gitea-actions-runner = { services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner; package = pkgs.forgejo-actions-runner;
instances.default = { instances.default = {
enable = true; enable = true;
name = "monolith"; name = "nixos-runner";
url = "https://git.le43.eu"; url = "https://git.le43.eu";
tokenFile = config.age.secrets.forgejo-runner-token.path; tokenFile = config.age.secrets.forgejo-runner-token.path;
labels = [ labels = [