hydra: make hydra-init wait for networking
Closes: #366
Martin Weinelt committed
Feb 13, 2025 at 14:12 UTC
9782a24ef559b21836cc469c802b18e45a16343c
1 file changed
+13
build/hydra.nix
+13
@@ -124,6 +124,19 @@ in
124
"d ${narCache} 0775 hydra hydra 1d -"
125
];
126
127
+ # wait for the network before starting hydra, since we require a network
128
+ # connection to the remote postgresql database
129
+ systemd.services.hydra-init = {
130
+ wants = [
131
+ "network-online.target"
132
+ "wireguard-wg0.target"
133
+ ];
134
+ after = [
135
+ "network-online.target"
136
+ "wireguard-wg0.target"
137
+ ];
138
+ };
139
+
140
# eats memory as if it was free
141
systemd.services.hydra-notify.enable = false;
142