add forgejo runner
This commit is contained in:
parent
b16ceb22ee
commit
6628ed9789
7 changed files with 100 additions and 78 deletions
34
hosts/forgejo-runner/default.nix
Normal file
34
hosts/forgejo-runner/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common.nix
|
||||
../../services/openssh.nix
|
||||
../../services/prometheus-node.nix
|
||||
./forgejo-runner.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "forgejo-runner";
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMn0SP19A5C8PqdH+99ki3TILozj/U4tBSQxcRRepN21 samuel@pluto"
|
||||
];
|
||||
|
||||
environment.etc."ssh/banner".text = ''
|
||||
_ __ __ __ ___ ___ __ _ __
|
||||
/\`'__\/\ \/\ \ /' _ `\ /' _ `\ /'__`\/\`'__\
|
||||
\ \ \/ \ \ \_\ \/\ \/\ \/\ \/\ \/\ __/\ \ \/
|
||||
\ \_\ \ \____/\ \_\ \_\ \_\ \_\ \____\\ \_\
|
||||
\/_/ \/___/ \/_/\/_/\/_/\/_/\/____/ \/_/
|
||||
'';
|
||||
services.openssh.settings.Banner = "/etc/ssh/banner";
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
52
hosts/forgejo-runner/forgejo-runner.nix
Normal file
52
hosts/forgejo-runner/forgejo-runner.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.gitea-actions-runner = {
|
||||
package = pkgs.forgejo-runner;
|
||||
instances.snowden = {
|
||||
enable = true;
|
||||
name = "snowden";
|
||||
url = "https://git.berlin.ccc.de";
|
||||
labels = [
|
||||
"debian-stable:docker://docker.io/debian:stable-slim"
|
||||
"alpine-latest:docker://docker.io/alpine:latest"
|
||||
"buildkit:docker://docker.io/moby/buildkit:rootless"
|
||||
];
|
||||
tokenFile = config.age.secrets.forgejo-runner-token-env.path;
|
||||
settings = {
|
||||
runner.labels = {
|
||||
debian-stable = {
|
||||
backend = "docker";
|
||||
backend-options = {
|
||||
image = "docker.io/debian:stable-slim";
|
||||
platform = "linux/amd64";
|
||||
};
|
||||
};
|
||||
alpine-latest = {
|
||||
backend = "docker";
|
||||
backend-options = {
|
||||
image = "docker.io/alpine:latest";
|
||||
platform = "linux/amd64";
|
||||
};
|
||||
};
|
||||
buildkit = {
|
||||
backend = "docker";
|
||||
backend-options = {
|
||||
image = "docker.io/moby/buildkit:rootless";
|
||||
platform = "linux/amd64";
|
||||
};
|
||||
};
|
||||
};
|
||||
server.connections.forgejo = {
|
||||
url = "https://git.berlin.ccc.de/";
|
||||
uuid = "7fd3683e-1bc1-429f-8467-e6d27044eb91";
|
||||
token_url = "file://${config.age.secrets.forgejo-runner-token.path}";
|
||||
};
|
||||
container = {
|
||||
enable_ipv6 = true;
|
||||
docker_host = "unix:///run/podman/podman.sock";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue