From 60446dda1fca1f80876ba16e26b61ec486b377aa Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Tue, 14 Feb 2023 19:45:33 +0100 Subject: [PATCH] nixos/hydra: wait for network-online before evaluator start This prevents issues I'm seeing with the hydra I'm running on my laptop. Every time I reboot it I see eval errors like this: ``` error fetching latest change from git repo at `https://github.com/nixos/nixpkgs.git': fatal: unable to access 'https://github.com/nixos/nixpkgs.git/': Could not resolve host: github.com ``` This is because the evaluator already starts before the network is actually online. It should wait until the network is fully online before starting evaluation to prevent evaluation errors like above. --- nixos/modules/services/continuous-integration/hydra/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/continuous-integration/hydra/default.nix b/nixos/modules/services/continuous-integration/hydra/default.nix index 564bcd37dec..83078706fca 100644 --- a/nixos/modules/services/continuous-integration/hydra/default.nix +++ b/nixos/modules/services/continuous-integration/hydra/default.nix @@ -398,7 +398,7 @@ in systemd.services.hydra-evaluator = { wantedBy = [ "multi-user.target" ]; requires = [ "hydra-init.service" ]; - after = [ "hydra-init.service" "network.target" ]; + after = [ "hydra-init.service" "network.target" "network-online.target" ]; path = with pkgs; [ hydra-package nettools jq ]; restartTriggers = [ hydraConf ]; environment = env // {