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

@ -81,7 +81,7 @@ let
read_api_key_file /etc/nasa-api.env
fi
if [ -z "$api_key" ]; then
api_key="DEMO_KEY"
exit 0
fi
today="$(date +%F)"
@ -400,6 +400,7 @@ in
description = "Fetch NASA APOD wallpaper for greetd";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
restartIfChanged = false;
serviceConfig = {
Type = "oneshot";
ExecStart = "${fetchGreetdApod}/bin/greetd-apod-wallpaper";
@ -411,9 +412,9 @@ in
systemd.timers.greetd-apod-wallpaper = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "30s";
OnCalendar = "hourly";
Persistent = true;
OnActiveSec = "2m";
OnUnitActiveSec = "1h";
Persistent = false;
Unit = "greetd-apod-wallpaper.service";
};
};