diff options
| author | Rodney Lorrimar <rodney.lorrimar@iohk.io> | 2018-04-25 07:17:50 +0100 |
|---|---|---|
| committer | Rodney Lorrimar <rodney.lorrimar@iohk.io> | 2018-04-25 09:37:30 +0100 |
| commit | 80baf761852f4f8ad4b04972aeea50cc4a4eb424 (patch) | |
| tree | 60e3cad9ab5cc6be7485daa1c1dcdc32581f0e74 /modules | |
| parent | 6aac14a46d44dd0956a9fc3e7e94dbbacd54d5d8 (diff) | |
buildkite-agent: Only start service once networking is available
buildkite-agent gets the hostname at startup, so needs to be started
after the hostname is set.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/services/buildkite-agent.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/services/buildkite-agent.nix b/modules/services/buildkite-agent.nix index 1438eee..165323b 100644 --- a/modules/services/buildkite-agent.nix +++ b/modules/services/buildkite-agent.nix @@ -221,11 +221,20 @@ in ''; serviceConfig = { - KeepAlive = true; - RunAtLoad = true; ProcessType = "Interactive"; ThrottleInterval = 30; + # The combination of KeepAlive.NetworkState and WatchPaths + # will ensure that buildkite-agent is started on boot, but + # after networking is available (so the hostname is + # correct). + RunAtLoad = true; + KeepAlive.NetworkState = true; + WatchPaths = [ + "/etc/resolv.conf" + "/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist" + ]; + GroupName = "buildkite-agent"; UserName = "buildkite-agent"; WorkingDirectory = config.users.users.buildkite-agent.home; |
