put back virtualisation system using docker
All checks were successful
/ Build Nix targets (push) Successful in 1m16s

This commit is contained in:
Awen Lelu 2025-11-12 12:07:06 +01:00
parent c228d817a7
commit 55ce392b3a
2 changed files with 62 additions and 59 deletions

View File

@ -22,35 +22,35 @@ in
services.gitea-actions-runner.package = unstable.gitea-actions-runner; services.gitea-actions-runner.package = unstable.gitea-actions-runner;
services.gitea-actions-runner.instances = { # services.gitea-actions-runner.instances = {
"gitea.shobu.fr-runner" = { # "gitea.shobu.fr-runner" = {
enable = true; # enable = true;
name = "gitea.shobu.fr-runner"; # name = "gitea.shobu.fr-runner";
url = nodes.sin.config.services.gitea.settings.server.ROOT_URL; # url = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
token = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW"; # token = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
labels = [ # labels = [
"ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04" # "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
]; # ];
settings = { # settings = {
cache = { # cache = {
# Enable cache server to use actions/cache. # # Enable cache server to use actions/cache.
enabled = true; # enabled = true;
# The directory to store the cache data. # # The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache. # # If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir = ""; # dir = "";
# The host of the cache server. # # The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers. # # It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically. # # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host = ""; # host = "";
# The port of the cache server. # # The port of the cache server.
# 0 means to use a random available port. # # 0 means to use a random available port.
port = 0; # port = 0;
# The external cache server URL. Valid only when enable is true. # # The external cache server URL. Valid only when enable is true.
# If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself. # # If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
# The URL should generally end with "/". # # The URL should generally end with "/".
external_server = ""; # external_server = "";
}; # };
}; # };
}; # };
}; # };
} }

View File

@ -1,4 +1,5 @@
{nodes, pkgs, ...}: { { nodes, pkgs, ... }:
{
systemd.sockets.podman.socketConfig.Symlinks = [ systemd.sockets.podman.socketConfig.Symlinks = [
"/run/docker.sock" "/run/docker.sock"
]; ];
@ -15,32 +16,34 @@
}; };
}; };
# virtualisation.oci-containers.containers = let virtualisation.oci-containers.containers =
# runner_config = pkgs.writeTextFile { let
# name = "config.yml"; runner_config = pkgs.writeTextFile {
# text = '' name = "config.yml";
# container: text = ''
# network: "host" container:
# ''; network: "host"
# }; '';
# in { };
# gitea-runner = { in
# image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944"; {
# autoStart = true; gitea-runner = {
image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944";
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"
# ]; ];
# }; };
# }; };
} }