movie_recs_notify: resolve movie_recs next to itself

RECS was the absolute path /home/connor/.local/bin/movie_recs. That worked
while ~/.local/bin was a dotbot link into hosts/<host>/bin, but base.conf.yaml
now *creates* it as a real directory owned by the package managers, so the
movie_recs link went away with it. Every timer run since died on
FileNotFoundError before reaching LiteLLM, which is why the ntfy push went
quiet rather than reporting a failure.

The unit already invokes this script as %h/.dotfiles/hosts/mainframe/bin/...,
so deriving the sibling path from __file__ cannot drift from however the unit
is spelled, and does not care what ~/.local/bin becomes next.
This commit is contained in:
connor committed 2026-09-17 12:33:10 -04:00
1 parent f38ffc6dbd
commit ed99ce6a2a
1 file changed
+6 -1
+6 -1
View File
@@ -16,7 +16,12 @@ NTFY = "https://ntfy.rcjohnstone.com/movies"
# credential. Mirrored from the rbw entry `ntfy-bot`; rbw is the source of
# truth. Kept in a 0600 file because this runs unattended from a timer.
NTFY_ENV = os.path.expanduser("~/.config/ntfy/publish.env")
RECS = "/home/connor/.local/bin/movie_recs"
# Resolved next to this script, not via ~/.local/bin. That directory used to
# be a dotbot link into hosts/<host>/bin; it is now a real directory owned by
# the package managers (meta/base.conf.yaml), so the movie_recs link vanished
# and every run since died with FileNotFoundError. The sibling path is what
# the unit already uses for this script itself and cannot drift from it.
RECS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "movie_recs")
COUNT = "10"