Nixos Impermanence

Can I use this NixOS module on this VPS servers? I need to create an empty ZFS screenshot or BTRFS screenshot to accomplice this. Is this possible?

2 Likes

No, even the setup using tmpfs would require support from our side. It’s because our VPS are containers and the root filesystem is mounted by LXC, not your configuration. At least, this was my finding the last time I looked into it.

I’m going to take another look at it. Impermanence using ZFS could be possible to implement. The idea is that the root dataset would be impermanent and there’d be one subdataset for persistent data and one for the nix store. Then a feature flag in vpsAdmin that would enable the impermanence support in our platform. I’m going to report back when I’ll have something tangible.

1 Like

Okay, so I’ve prepared initial support for NixOS Impermanence and I’d welcome feedback if it works as desired. You can follow the guide in KB: NixOS Impermanence [Knowledge base]

Feel free to ask if you have further questions, you can also find me in our Matrix room.

If this would work, then the next step would be to create a different OS template, so you could create a new VPS which would already be split into subdatasets and have the feature enabled. That would be a bigger change, so first I’d like to know if this approach is usable.

I forgot to mention that the impermanence feature currently works only on staging (node1.stg), so please create VPS there.

I have created a VPS in staging and don’t see the option NixOS Impermanence

Fixed, it’s in form Features

Works like a charm! The only thing that you have to do is to clean up the /persistent mount, because it is first used as the root.

1 Like

Glad to hear that :slight_smile: I still need to polish it up, it could be available on production nodes maybe next week. Then I’d like to make it easier to set up, but I’m not clear on all the details. It’s more likely that we’ll announce impermanence support as it is now and improve it later on.

I think that is a good idea. NixOS has already a steep learning curve. So if it works, it works :grinning:. People can figure it out for them self :joy:.

There’re now NixOS templates in vpsAdmin with preconfigured impermanence module. You can select it when creating a new VPS. It comes with the subdataset for /nix, the needed mounts, etc. I’ve updated the knowledge base article. It still works only on staging. Feel free to give it a go :slight_smile: I’m quite happy with it now, this is how we’re going to release it unless we’ll find some issues.

Impermanence can now be used on all nodes :+1: