Service config file outside of /etc?

EDIT: [Resolved]

I’m using gitlab-runner (https://github.com/NixOS/nixpkgs/blob/386234e2a61e1e8acf94dfa3a3d3ca19a6776efb/nixos/modules/services/continuous-integration/gitlab-runner.nix) on a build server running NixOS and have run into some trouble with configuration files that live outside of /etc.

This module writes a config file to /var/lib/... and it looks like if a change to configuration.nix results in a build of gitlab-runner that happens to be cached, nothing happens and the config file from the previous build remains.

I would like to avoid hacky workarounds of modifying arbitrary parameters or deleting cached builds to force a rebuild to deploy the new config file.

I’ve been using NixOS for a few months now but haven’t dug into file management yet past seeing that it’s not terribly simple outside of /etc so I’m unsure of how this is supposed to be happening. Is there a general way to manage files outside /etc correctly in a way that this behavior would not happen. Is anyone able to tell if this is an inherent issue with the gitlab-runner package or if there’s an alternate way of using the module that would be correct in this regard.

Thanks in advance for any help!

EDIT:

Of course 5 minutes after posting this, I realized the config file is generated in the service’s ExecStartPre phase instead of directly by nix. So the behavior that was confusing me was just based on other changes affecting whether the service started after nixos-rebuild.