nix-community / impermanence

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

Easy way to disable #138

Open dwarfmaster opened 1 year ago

dwarfmaster commented 1 year ago

When sharing nix modules between different systems, some that have an impermanence setup and others that don't, it would be useful to be able to easily enable/disable persistence without having to conditionally set it up. It would also be more consistent with other NixOS module.

Right now I am doing the following to disable:

{
  environment.persistence = lib.mkForce {};
}

But this feels more like a hack.

talyz commented 4 months ago

Hi! You should be able to use the enable option for this. It was undocumented, but I just added a bit about it in the README.