nrec-actions-runner #47

Merged
torjus merged 2 commits from nrec-actions-runner into master 2026-03-08 22:22:49 +00:00
4 changed files with 33 additions and 41 deletions

View File

@@ -1,14 +0,0 @@
name: Run nix flake check
on:
push:
pull_request:
jobs:
flake-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:runner-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v27
- run: nix flake check

View File

@@ -1,27 +0,0 @@
---
name: Periodic flake update
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
jobs:
flake-update:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:runner-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
- uses: cachix/install-nix-action@v27
- name: configure git
run: |
git config --global user.name 'torjus-bot'
git config --global user.email 'torjus-bot@git.t-juice.club'
- name: flake update
run: nix flake update --commit-lock-file
- name: push
run: git push

View File

@@ -3,6 +3,7 @@
imports = [ imports = [
./configuration.nix ./configuration.nix
../../system/packages.nix ../../system/packages.nix
../../services/actions-runner
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
} }

View File

@@ -0,0 +1,32 @@
{ config, pkgs, ... }:
{
virtualisation.podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
services.gitea-actions-runner = {
package = pkgs.forgejo-runner;
instances.actions1 = {
enable = true;
name = config.networking.hostName;
url = "https://code.t-juice.club";
tokenFile = "/var/lib/forgejo-runner/token";
labels = [
"nix:docker://nixos/nix:latest"
"node-bookworm:docker://node:lts-bookworm-slim"
"alpine:docker://alpine:latest"
];
settings = {
runner.capacity = 2;
cache = {
enabled = true;
dir = "/var/cache/forgejo-runner";
};
container.privileged = false;
};
};
};
}