Compare commits

..

1 Commits

Author SHA1 Message Date
Dennis - 837c41a2ae add gitea-actions-runner module 2024-04-12 21:59:04 +02:00
1 changed files with 7 additions and 1 deletions

View File

@ -40,6 +40,12 @@ in {
example = "accept-flake-config = true";
description = "Additional configuration to add to the nix.conf file";
};
kvm = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable KVM passthrough for the container";
};
};
};
@ -219,7 +225,7 @@ in {
tokenFile = "/var/lib/gitea-registration/gitea-runner-${iname}-token";
labels = [ "nix:docker://gitea-runner-nix" ];
settings.container = {
options = "-e NIX_BUILD_SHELL=/bin/bash -e PAGER=cat -e PATH=/bin -e SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt -v /nix:/nix -v ${storeDeps}/bin:/bin -v ${storeDeps}/etc/ssl:/etc/ssl --user gitea-actions";
options = "-e NIX_BUILD_SHELL=/bin/bash -e PAGER=cat -e PATH=/bin -e SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt${lib.optionalString cfg.kvm " --device /dev/kvm"} -v /nix:/nix -v ${storeDeps}/bin:/bin -v ${storeDeps}/etc/ssl:/etc/ssl --user gitea-actions";
network = "host";
valid_volumes = [
"/nix"