Are there better alternatives to the impermanence module?

I started off my nix config a year ago with GitHub - nix-community/impermanence: Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz] but it seems like it hasn’t been maintained since January of this year, with no PR or issue activity since then

Are there better alternatives? Should I ditch the module and handle things manually? I’ve seen a lot of people say that it doesn’t really do much in the unofficial NixOS Discord server

How do you handle your ephemeral root system?

I wanted a everyday compatible KISS (keep it stupid simple) solution, not adding any management, performance or stability overhead.

FuseFS, Overlays, merging and commits are cool if you need exactly this features, otherwise you pay a high price when it comes to performance, stability and edge cases.

So i just went with a with a simple root tmpfs and one simple ext4 persistance partition holding the /nix store ro and /var/lib & /home rw as folder and just mounting this folders in the tmpfs root tree as additional mount points.

root (/) (tmpfs, everything)

  • /nix (ro store mount)
  • /home (rw, mount dir)
  • /var/lib (rw, mount dir)

NixOS fstab:

Installation examples via Disko, Luks support, see Makefile in same dir.

2 Likes

Well, I wouldn’t take a lack of activity as a sign that you shouldn’t use it. If it works for you then that’s all that matters.

That said, I do like the approach of preservation quite a bit better. It tries to just do everything with normal systemd mechanisms, and it makes the boot process much easier to reason about and interact with.

4 Likes

Given there are new issues and PRs being opened and not looked at for months? I actually would consider this the sign of a dying project. The only recent repo activity appears to be from end users.

1 Like

I totally agree! However, I have been pinned to an older commit because the latest commits wont evaluate for me sadly. I bisected this and created an issue, which has not had any activity since
As waffle8946 said, I believe this is project is dying

This is good to keep in mind, I quite enjoy having an ephemeral home directory however (I know it’s not that useful, but I enjoy it!)

As a result, I use a lot of impermanence’s features in my flake

I’ve made a lustrate-inspired impermanence alternative:

It’s not thoroughly tested yet though

1 Like