Impermanence: Can the NixOS module do everything the Home Manager module does?

I currently use Impermanence in both NixOS (for system files) and in Home Manager (for user config files). But today I noticed that the NixOS version has a “users” section for handling user files as well.

So now I’m wondering, why use the Home Manager version? Is it just to have a separate “persist” location that is within the user directory, separate from the rest of the system? Or is there another use-case that the system module can’t handle?

To my understanding, the system module can do pretty much everything the Home Manager module can. However, the Home Manager module can work without system-level permissions.

Also I would recommend not using the Home Manager module if you can avoid it. It relies on FUSE and bindfs to make bind mounts entirely in userspace. As a result, performance is decreased and in my experience, certain programs operating in directories it manages can crash with a Too many files bindfs error.

Furthermore, bindfs does not support the x-gvfs-hide mount option and so there is no Home Manager equivalent to the hideMounts option in the system module, but that is more of a cosmetic issue.

2 Likes

Is that true even when using Home Manager as a NixOS module? I assumed everything had to be a full rebuild at that point.

Very interesting! I wonder why it uses bindfs with those known issues. Thanks!

No, just when using standalone Home Manager.

To my understanding, it is because FUSE is the only way to create or mount any sort of filesystem with only user permissions on Linux and technical limitations with FUSE cause these issues. Happy to help!

1 Like