diff --git a/flake.nix b/flake.nix index deacf49..e7d5e49 100644 --- a/flake.nix +++ b/flake.nix @@ -63,20 +63,20 @@ }; config = lib.mkIf config.services.wanireminder.enable { systemd.timers.wanireminder = { - wantedBy = ["wanireminder.target"]; after = ["network.target"]; timerConfig = { OnCalendar = "hourly"; Persistent = true; + Unit = ["wanireminder.service"]; }; }; systemd.services.wanireminder = { description = "Run wanireminders"; + script = let + configJson = builtins.toFile "config.json" (builtins.toJSON config.services.wanireminder); + in ''${self.defaultPackage.${system}}/bin/wanireminder ${configJson}''; serviceConfig = { Type = "oneshot"; - ExecStart = let - configJson = builtins.toFile "config.json" (builtins.toJSON config.services.wanireminder); - in ''${self.defaultPackage.${system}}/bin/wanireminder ${configJson}''; }; }; };