jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
8.37k stars 195 forks source link

nixcache: improve auto-configuration of cache #2010

Closed gcurtis closed 5 months ago

gcurtis commented 5 months ago

Fix a few issues with the current auto-configuration flow for private nix caches:

The logic for saving state around whether or not the cache setup has already run lives in a new setup package. The setup package tracks when a task last ran, what version of Devbox it ran with, and if there was an error. This makes it easier to define tasks that only run once for a user or only occur after an upgrade.