# Updating unreliable appliances

**URL:** https://discourse.nixos.org/t/updating-unreliable-appliances/37782
**Category:** Deployments
**Created:** [January 5, 2024, 12:13am UTC](https://discourse.nixos.org/t/updating-unreliable-appliances/37782 "2024-01-05T00:13:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hacker1024](https://discourse.nixos.org/user_avatar/discourse.nixos.org/hacker1024/32/7091_2.png) [@hacker1024](https://discourse.nixos.org/u/hacker1024)
#### Post date: [January 5, 2024, 12:13am UTC](https://discourse.nixos.org/t/updating-unreliable-appliances/37782/1 "2024-01-05T00:13:59Z")

</div>

We’re looking for a way to push updates to appliances that are shipped to customers and not always online. Are there any existing tools for this?

If there aren’t, this is what I had in mind:

1. Our Hydra instance builds NixOS system closures and pushes them to S3.
2. The system closures have a post build hook that writes the store path to a “latest version” file online.
3. The appliances have a system service that periodically checks the latest system closure. If it is not yet in use, the service will download the closure, update the system profile, run `switch-to-configuration`, and schedule a garbage collection.

Does this process make sense?

---

<div class="post-metadata">

### Author: ![TLATER](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tlater/32/4257_2.png) [@TLATER](https://discourse.nixos.org/u/TLATER)
#### Post date: [January 5, 2024, 8:42am UTC](https://discourse.nixos.org/t/updating-unreliable-appliances/37782/2 "2024-01-05T08:42:47Z")

</div>

I think you’re looking for a pull-based deployment tool, maybe something like [bento](https://github.com/rapenne-s/bento/).

There might be others at this point, not sure how maintained bento specifically is (or needs to be).

---

<div class="post-metadata">

### Author: ![hacker1024](https://discourse.nixos.org/user_avatar/discourse.nixos.org/hacker1024/32/7091_2.png) [@hacker1024](https://discourse.nixos.org/u/hacker1024)
#### Post date: [January 7, 2024, 11:13pm UTC](https://discourse.nixos.org/t/updating-unreliable-appliances/37782/3 "2024-01-07T23:13:18Z")

</div>

Thanks. As far as I can tell though, Bento uses SFTP, which is not very cost-effective at a scale.

It also seems to be source-based, meaning that the Nix files are downloaded and then evaluated on the clients themselves. This is not great for devices with small amounts of RAM, and isn’t great from a security perspective, either - ideally, we’d keep as much code as we can private.

---

<div class="post-metadata">

### Author: ![domenkozar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/domenkozar/32/38357_2.png) [@domenkozar](https://discourse.nixos.org/u/domenkozar)
#### Post date: [January 8, 2024, 3:16pm UTC](https://discourse.nixos.org/t/updating-unreliable-appliances/37782/4 "2024-01-08T15:16:18Z")

</div>

See also [Cachix Deploy — documentation](https://docs.cachix.org/deploy/), it’s free 🙂
