nix-community / impermanence

Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]
MIT License
1.09k stars 80 forks source link

nixos: Mount binds after the persistent storage path #66

Closed olmokramer closed 1 year ago

olmokramer commented 2 years ago

This sets the depends (introduced in https://github.com/NixOS/nixpkgs/pull/86967) of each bind mount so that it will only be mounted after the persistent storage path has been mounted, as suggested in https://github.com/nix-community/impermanence/issues/22#issuecomment-847879359.

An obvious issue with this is that this will break older NixOS where the option does not exist yet. Any suggestions on how to work around that?

cole-h commented 2 years ago

If GitHub's tags are to be believed, that PR is present in both 21.05 and 21.11, and support for any version of NixOS older than those have expired. IME, this is fine; however, I'd want to document this new version bound. Something like "as of PR #66 (with a link), NixOS 21.05 or later is required for proper functionality", or however you'd care to word it with a similar effect.

Though, this is also just my opinion. cc @talyz @lovesegfault @etu

olmokramer commented 2 years ago

Ah I did not know that the patch was backported to all supported versions of NixOS. I agree that the change in version requirements should be documented as @cole-h suggests. I'll try to find some time in the weekend to make the changes.

talyz commented 1 year ago

Fixed in #115

olmokramer commented 1 year ago

Oh hey I totally forgot about this one. Thanks for picking it up again @Kranzes!