wait for active internet connection

This commit is contained in:
Kristian Krsnik 2024-07-27 18:31:19 +02:00
parent 336d3ecf21
commit f04316b277
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85

View File

@ -44,17 +44,17 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [package]; environment.systemPackages = [package];
systemd.services.dyn-gandi = mkIf (cfg.timer systemd.services.dyn-gandi = mkIf (cfg.timer != null) {
!= null) {
script = "${package}/bin/dyn-gandi --config ${configFile}"; script = "${package}/bin/dyn-gandi --config ${configFile}";
after = ["network-online.target"];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
}; };
}; };
systemd.timers.dyn-gandi = mkIf (cfg.timer systemd.timers.dyn-gandi = mkIf (cfg.timer != null) {
!= null) {
wantedBy = ["timers.target"]; wantedBy = ["timers.target"];
timerConfig = { timerConfig = {
OnBootSec = "0s"; OnBootSec = "0s";