forked from Fediversity/Fediversity
parent
96e2f4ac5d
commit
6755385536
1 changed files with 9 additions and 7 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Reference in a new issue