I'd like to build an image for a Raspberry Pi with impermanence / a read-only sd card - Is there a guide for sth like that?

I want to build an Raspberry Pi image, build on my workstation so I can just dd it to an SD card.

There seem to be several guides on how to do that. But: I need the entire SD card read-only because the RasPi can loose power at any time.

In the past I’ve done that with a script like this. And now I’d like to do this with NixOS. I read about impermanence but I can’t manage to combine the concepts. Is there anyone who did something like that and wrote some blog article that I didn’t find? Is Impermanence the correct concept to do something like this?

And a bonus question: What’s the current situation with binary caching and the armv7 architecture? Is there still nothing out there? I’d try and tinker around until I find a solution on my own, but building images takes so much resources…

1 Like

I run a raspberry pi 3 with impermenance as an IPMI gateway, see my config https://git.sr.ht/~magic_rb/dotfiles/tree/master/item/nixos/systems/gooseberry i hope it help. Feel free to prod me with questions :slight_smile:

2 Likes

Awesome. Thank you very much.

Regarding the cache I’ve had better experience using aarch64 instead of armv7.

While my project is currently in the fridge, I’ve collected some raspberry pi related links that might be relevant to you. Unfortunately nothing in there directly answers your question.