Revert "switch to podman"

This reverts commit 60e7b841a9.
This commit is contained in:
Kiara Grouwstra 2025-07-11 13:41:05 +02:00
parent 96e2f4ac5d
commit 6755385536
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -49,7 +49,7 @@ in
name = config.networking.fqdn; name = config.networking.fqdn;
url = "https://git.fediversity.eu"; url = "https://git.fediversity.eu";
tokenFile = config.age.secrets.forgejo-runner-token.path; tokenFile = config.age.secrets.forgejo-runner-token.path;
## This runner supports podman (with a default Ubuntu image) and native ## This runner supports Docker (with a default Ubuntu image) and native
## modes. In native mode, it contains a few default packages. ## modes. In native mode, it contains a few default packages.
labels = [ labels = [
"nix:docker://gitea-runner-nix" "nix:docker://gitea-runner-nix"
@ -97,7 +97,9 @@ in
groups.nixuser = { }; groups.nixuser = { };
}; };
virtualisation = { virtualisation = {
podman.enable = true; ## For the Docker mode of the runner.
## Podman seemed to get stuck on the checkout step
docker.enable = true;
containers.containersConf.settings = { containers.containersConf.settings = {
# podman (at least) seems to not work with systemd-resolved # podman (at least) seems to not work with systemd-resolved
containers.dns_servers = [ containers.dns_servers = [
@ -110,10 +112,10 @@ in
{ {
gitea-runner-nix-image = { gitea-runner-nix-image = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "podman.service" ]; after = [ "docker.service" ];
requires = [ "podman.service" ]; requires = [ "docker.service" ];
path = [ path = [
config.virtualisation.podman.package pkgs.docker
pkgs.gnutar pkgs.gnutar
pkgs.shadow pkgs.shadow
pkgs.getent pkgs.getent
@ -152,7 +154,7 @@ in
# list the content as it will be imported into the container # list the content as it will be imported into the container
tar -cv . | tar -tvf - tar -cv . | tar -tvf -
tar -cv . | podman import - gitea-runner-nix tar -cv . | docker import - gitea-runner-nix
''; '';
serviceConfig = { serviceConfig = {
RuntimeDirectory = "gitea-runner-nix-image"; RuntimeDirectory = "gitea-runner-nix-image";
@ -213,7 +215,7 @@ in
"~setdomainname" "~setdomainname"
"~sethostname" "~sethostname"
]; ];
SupplementaryGroups = [ "podman" ]; SupplementaryGroups = [ "docker" ];
RestrictAddressFamilies = [ RestrictAddressFamilies = [
"AF_INET" "AF_INET"
"AF_INET6" "AF_INET6"