From a58dd30d2be0845295c61fa4ff98ff7fd082f9d1 Mon Sep 17 00:00:00 2001 From: Louis Opter Date: Fri, 12 Dec 2025 20:52:37 +0000 Subject: [PATCH] github-runner: canonicalizes `workDir` to fix `actions/checkout@v6` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We ran into this issue wherein GitHub's `actions/checkout` would fail because `git-config` would fail to include additional configuration. The symptom was: ``` Error: fatal: could not read Username for 'https://github.com': terminal prompts disabled ``` And is caused by `git config --local includeIf.gitdir:/var/lib/github-runners/_work/…`. Wherein `git` apparently resolves (canonicalizes) the current repository path which then does not match the argument for `includeIf.gitdir` which then means the configuration that `actions/checkout` is trying to apply does not get pulled in, which then prevents git from authenticating with GitHub and fails the build. Ngl, gemini 3 found that out for me. We could prefix `/private` everywhere, but changing the user's home directory is going to [be tricky], not sure what do to about that. [be tricky]: https://github.com/nix-darwin/nix-darwin/blob/7e22bf538aa3e0937effcb1cee73d5f1bcc26f79/modules/users/default.nix#L208 --- modules/services/github-runner/service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/github-runner/service.nix b/modules/services/github-runner/service.nix index 10fac86..9dd9b20 100644 --- a/modules/services/github-runner/service.nix +++ b/modules/services/github-runner/service.nix @@ -8,7 +8,7 @@ let mkSvcName = name: "github-runner-${name}"; mkStateDir = cfg: "/var/lib/github-runners/${cfg.name}"; mkLogDir = cfg: "/var/log/github-runners/${cfg.name}"; - mkWorkDir = cfg: if (cfg.workDir != null) then cfg.workDir else "/var/lib/github-runners/_work/${cfg.name}"; + mkWorkDir = cfg: if (cfg.workDir != null) then cfg.workDir else "/private/var/lib/github-runners/_work/${cfg.name}"; in { config.assertions = flatten (