Nix-darwin: can't get gitlab-runner to work

I’ve configured gitlab-runner with nix-darwin on a MacOS (Ventura) VM, however it doesn’t seem to get configured.

I have added users.knownUsers = [ "gitlab-runner" ]; which makes sure the user is created, but I had to manually create /var/lib/gitlab-runner (which appears to be) the correct default, and I chowned it correctly and put a registration file in there with registrationConfigFile = "/var/lib/gitlab-runner/macos.reg"; (in lieu of being able to use sops-nix).

macos.reg sets


(similar to other (NixOS) runners I’m operating)

However when I rebuild and (even) run sudo launchctl start org.nixos.gitlab-runner I see no such process (ps auxc | grep gitlab), but no failure messages either. (Checking out the syslog via Console gives either too much or too litle, but nothing related to gitlab-runner)

Any ideas where to go from here/what might be the case?

Oh, detailed inspection of /Library/LaunchDaemons/org.nixos.gitlab-runner.plist revealed that there is


so I figured the gitlab-runner group is actually mandatory, but not automatically created unless one also sets users.knownGroups = [ "gitlab-runner" ];. In hindsight logical, but the discoverability of this behaviour could’ve been better.

With this it finally works.