You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless very low latency updates are needed, I'd think a cron job or systemd timer would work best for this indeed, because then it doesn't depend on having some external stateful setup (e.g. a webhook setup for the GitHub repo), so it's more self-contained. This in turn also means that it's possible to easily use alternate git repositories.
Personally I'd recommend a systemd timer/service as they're more flexible than cron jobs (though a bit more verbose to set up too). A timer/service combo can look like this:
{systemd.timers.git-updater={wantedBy=["timers.target"];# Wait 60 seconds after the service finished before starting it again# This should prevent the service being started again too early if an update is in progresstimerConfig.OnUnitInactiveSec=60;};systemd.services.git-updater={# I'm not entirely sure why this would be neededserviceConfig.Type="oneshot";script='' # Update script here '';};}
I want the
tv
device to automatically pull latest changes and runnixos-rebuild && reboot
every timetv.nix
is updated in GitHub's master.Ideas:
git pull && nixos-rebuild
git pull && nixos-rebuild
Bonus karma points if it automatically boots into previous configuration in case it cannot boot into the new configuration.
The text was updated successfully, but these errors were encountered: