feat: apod timer changes

This commit is contained in:
Jet 2026-05-06 11:41:44 -07:00
parent 07e7d2e047
commit a7c9e90046
No known key found for this signature in database
3 changed files with 10 additions and 8 deletions

View file

@ -174,7 +174,7 @@ let
read_api_key_file "''${NASA_API_KEY_FILE:-${config.home.homeDirectory}/.config/nasa-api.env}"
fi
if [ -z "$api_key" ]; then
api_key="DEMO_KEY"
exit 0
fi
api_curl_args=(

View file

@ -292,6 +292,7 @@ in
Description = "Fetch NASA APOD wallpaper";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
X-RestartIfChanged = false;
};
Service = {
Type = "oneshot";
@ -304,9 +305,9 @@ in
systemd.user.timers.nasa-apod-wallpaper = {
Unit.Description = "Refresh NASA APOD wallpaper regularly";
Timer = {
OnStartupSec = "2m";
OnCalendar = "hourly";
Persistent = true;
OnActiveSec = "2m";
OnUnitActiveSec = "1h";
Persistent = false;
Unit = "nasa-apod-wallpaper.service";
};
Install.WantedBy = [ "timers.target" ];