psyanticy has quit [Quit: Connection closed for inactivity]
<gchristensen>
is there a way to restart services after nixops copies keys?
<gchristensen>
yes
<gchristensen>
If you have a custom service that depends on a key from deployment.keys, you can opt to let systemd track that dependency. Each key gets a corresponding systemd service "${keyname}-key.service" which is active while the key is present, and otherwise inactive when the key is absent. See Example 3.12 for how to set this up.
<aminechikhaoui>
or maybe rely on keys.target in the systemd unit
<gchristensen>
oh nice
<aminechikhaoui>
but I think there are issues with that if the service gets started during boot with dependency on multi-user.target iirc
<gchristensen>
ah
<aminechikhaoui>
as that means it would get stuck during the boot process since you don't have the keys in tmpfs yet
<aminechikhaoui>
at least I remember an issue like that, not sure about the exact config I had at the time
<gchristensen>
after = [ "buildkite-ssh-private-key-key.service" "buildkite-ssh-public-key-key.service" "buildkite-token-key.service" ]; <- lol
<gchristensen>
hmm
<gchristensen>
I think I want partOf too
<aminechikhaoui>
I never get those options right :D