Consolidate Gitea runners on NixOS
Deploy cloud-pc / deploy (push) Failing after 1s
Deploy mini-pc / deploy (push) Failing after 0s
NixOS switch mini-pc / switch (push) Has been cancelled
NixOS switch cloud-pc / switch (push) Has been cancelled

Add the docker group to the runner services and allow passwordless
nixos-rebuild for the gitea-runner user.
This commit is contained in:
Dmitry
2026-05-30 12:35:48 +03:00
parent 27bdb48466
commit 9148838e12
6 changed files with 36 additions and 42 deletions
+18 -4
View File
@@ -75,13 +75,27 @@
}
'';
services.gitea-actions-runner.instances."mini-pc-nixos" = {
services.gitea-actions-runner.instances."mini-pc" = {
enable = true;
name = "mini-pc-nixos";
name = "mini-pc";
url = "https://git.ada-dev.ru";
tokenFile = "/etc/gitea-runner/mini-pc-nixos.token";
labels = [ "mini-pc-nixos" ];
tokenFile = "/etc/gitea-runner/mini-pc.token";
labels = [ "mini-pc" "mini-pc-nixos" ];
};
systemd.services."gitea-runner-mini-pc".serviceConfig.SupplementaryGroups = [ "docker" ];
security.sudo.extraRules = [
{
users = [ "gitea-runner" ];
commands = [
{
command = "/run/current-system/sw/bin/nixos-rebuild";
options = [ "NOPASSWD" ];
}
];
}
];
system.stateVersion = "25.11";
}