nix-community / impermanence

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

nixos: Introduce `persistentStoragePath` option #134

Closed talyz closed 12 months ago

talyz commented 1 year ago

This allows the path to persistent storage to be defined through an option in the submodule, not just by the submodule name, i.e. instead of

environment.persistence."/persistent" = {
  files = [ ... ]
  directories = [ ... ]
};

you could specify

environment.persistence.main = {
  persistentStoragePath = "/persistent";
  files = [ ... ]
  directories = [ ... ]
};

which is good for readability and when you want to split the config between multiple files.

Fixes #117.

cc @civts @eyJhb

mibmo commented 1 year ago

Works for me! :) ETA on merging?

eyJhb commented 1 year ago

I haven't had the time to test it out, and won't have time until Monday most likely... So if it works for others, just merge :D

Sorry!

On 29 June 2023 18.34.42 CEST, mib @.***> wrote:

Works for me! :) ETA on merging?

-- Reply to this email directly or view it on GitHub: https://github.com/nix-community/impermanence/pull/134#issuecomment-1613504009 You are receiving this because you were mentioned.

Message ID: @.***>

eyJhb commented 1 year ago

Works fine! I think you can merge this :) Thanks for the doing this!

mibmo commented 12 months ago

I second that! Been using it for a month with zero problems :)

eyJhb commented 11 months ago

Any possibility for adding this to the home-manager module?

eyJhb commented 11 months ago

I've added a PR that should add this. However, unsure of the code quality.