From f04316b277fd816e0b461fab80215b3519c5a08a Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Sat, 27 Jul 2024 18:31:19 +0200 Subject: [PATCH] wait for active internet connection --- nix/module.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/module.nix b/nix/module.nix index 1f01c69..02eb95a 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -44,17 +44,17 @@ in { config = mkIf cfg.enable { environment.systemPackages = [package]; - systemd.services.dyn-gandi = mkIf (cfg.timer - != null) { + systemd.services.dyn-gandi = mkIf (cfg.timer != null) { script = "${package}/bin/dyn-gandi --config ${configFile}"; + after = ["network-online.target"]; + serviceConfig = { Type = "oneshot"; }; }; - systemd.timers.dyn-gandi = mkIf (cfg.timer - != null) { + systemd.timers.dyn-gandi = mkIf (cfg.timer != null) { wantedBy = ["timers.target"]; timerConfig = { OnBootSec = "0s";