about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix')
-rw-r--r--nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix23
1 files changed, 13 insertions, 10 deletions
diff --git a/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix b/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
index 06f0da3451a6..30be56f8eeab 100644
--- a/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
+++ b/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
@@ -60,17 +60,17 @@ in
 
     instances = mkOption {
       default = {};
-      description = lib.mdDoc ''
+      description = ''
         Gitea Actions Runner instances.
       '';
       type = attrsOf (submodule {
         options = {
-          enable = mkEnableOption (lib.mdDoc "Gitea Actions Runner instance");
+          enable = mkEnableOption "Gitea Actions Runner instance";
 
           name = mkOption {
             type = str;
             example = literalExpression "config.networking.hostName";
-            description = lib.mdDoc ''
+            description = ''
               The name identifying the runner instance towards the Gitea/Forgejo instance.
             '';
           };
@@ -78,7 +78,7 @@ in
           url = mkOption {
             type = str;
             example = "https://forge.example.com";
-            description = lib.mdDoc ''
+            description = ''
               Base URL of your Gitea/Forgejo instance.
             '';
           };
@@ -86,7 +86,7 @@ in
           token = mkOption {
             type = nullOr str;
             default = null;
-            description = lib.mdDoc ''
+            description = ''
               Plain token to register at the configured Gitea/Forgejo instance.
             '';
           };
@@ -94,7 +94,7 @@ in
           tokenFile = mkOption {
             type = nullOr (either str path);
             default = null;
-            description = lib.mdDoc ''
+            description = ''
               Path to an environment file, containing the `TOKEN` environment
               variable, that holds a token to register at the configured
               Gitea/Forgejo instance.
@@ -113,7 +113,7 @@ in
                 #"native:host"
               ]
             '';
-            description = lib.mdDoc ''
+            description = ''
               Labels used to map jobs to their runtime environment. Changing these
               labels currently requires a new registration token.
 
@@ -122,7 +122,7 @@ in
             '';
           };
           settings = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Configuration for `act_runner daemon`.
               See https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml for an example configuration
             '';
@@ -158,7 +158,7 @@ in
                 wget
               ]
             '';
-            description = lib.mdDoc ''
+            description = ''
               List of packages, that are available to actions, when the runner is configured
               with a host execution label.
             '';
@@ -203,6 +203,8 @@ in
             TOKEN = "${instance.token}";
           } // optionalAttrs (wantsPodman) {
             DOCKER_HOST = "unix:///run/podman/podman.sock";
+          } // {
+            HOME = "/var/lib/gitea-runner/${name}";
           };
           path = with pkgs; [
             coreutils
@@ -236,7 +238,8 @@ in
                   --instance ${escapeShellArg instance.url} \
                   --token "$TOKEN" \
                   --name ${escapeShellArg instance.name} \
-                  --labels ${escapeShellArg (concatStringsSep "," instance.labels)}
+                  --labels ${escapeShellArg (concatStringsSep "," instance.labels)} \
+                  --config ${configFile}
 
                 # and write back the configured labels
                 echo "$LABELS_WANTED" > "$LABELS_FILE"