Compare commits

...

2 Commits

Author SHA1 Message Date
shobu
27862a3be1 test
Some checks failed
/ build hive configuration (push) Failing after 15s
/ Build Nix targets (push) Has been cancelled
2025-11-12 05:19:27 +01:00
shobu
41e5077f7d use native nix runner service 2025-11-12 05:08:30 +01:00
3 changed files with 45 additions and 32 deletions

View File

@ -7,11 +7,7 @@ on:
jobs: jobs:
build: build:
name: build hive configuration name: build hive configuration
runs-on: ubuntu-22.04 runs-on: nix-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: cachix/install-nix-action@v31 - run: nix run nixpkgs#colmena apply
with:
install_url: https://releases.nixos.org/nix/nix-2.20.0/install
- uses: https://github.com/nicknovitski/nix-develop@v1
- run: colmena apply

View File

@ -9,4 +9,21 @@ in{
proto = "tcp"; proto = "tcp";
destination = "${sin-address}:22"; destination = "${sin-address}:22";
}]; }];
services.gitea-actions-runner.instances = {
"gitea.shobu.fr-runner" = {
enable = true;
name = "gitea.shobu.fr-runner";
url = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
token = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
labels = [
"debian-latest:docker://debian:latest"
"ubuntu-latest:docker://ubuntu:latest"
"nix-latest:docker://nixos/nix:latest"
"debian-latest:docker://node:18-bullseye"
"ubuntu-latest:docker://node:18-bullseye"
#"native:host"
];
};
};
} }

View File

@ -15,32 +15,32 @@
}; };
}; };
virtualisation.oci-containers.containers = let # virtualisation.oci-containers.containers = let
runner_config = pkgs.writeTextFile { # runner_config = pkgs.writeTextFile {
name = "config.yml"; # name = "config.yml";
text = '' # text = ''
container: # container:
network: "host" # network: "host"
''; # '';
}; # };
in { # in {
gitea-runner = { # gitea-runner = {
image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944"; # image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944";
autoStart = true; # autoStart = true;
# capabilities = { # # capabilities = {
# NET_RAW = true; # # NET_RAW = true;
# }; # # };
environment = { # environment = {
GITEA_INSTANCE_URL = nodes.sin.config.services.gitea.settings.server.ROOT_URL; # GITEA_INSTANCE_URL = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
GITEA_RUNNER_REGISTRATION_TOKEN = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW"; # GITEA_RUNNER_REGISTRATION_TOKEN = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
CONFIG_FILE = "/config.yml"; # CONFIG_FILE = "/config.yml";
}; # };
volumes = [ # volumes = [
"/var/run/docker.sock:/var/run/docker.sock" # "/var/run/docker.sock:/var/run/docker.sock"
"${runner_config}:/config.yml:ro" # "${runner_config}:/config.yml:ro"
]; # ];
}; # };
}; # };
} }