Open SrEstegosaurio opened 1 year ago
I was just discovering the lack of persistentStoragePath
in the home-manager module myself... I wanted to declare my persistent setup in home-manager.sharedModules
, name the attrs in home.persistence
to "state" and then set the persistentStoragePath
individually based on config.user.username
but this is proving non-trivial due to the differences.
@nocha1n I mean, this is what I had to do in order to avoid putting specific paths instead of just using config.xdg.dataHome
:
# Persists the requiered gpg directories.
persistence."/nix/persistent${config.home.homeDirectory}" = {
directories = [
(builtins.toString (lib.path.removePrefix (/. + config.home.homeDirectory) (/. + (config.programs.gpg.homedir + "/private-keys-v1.d"))))
];
};
The previous chunk of code "relativises" paths to the user home directory. I'm currently working in making a function that does this exact thing since I need it in a lot of places.
EDIT:
And regarding the persistentStoragePath
issue; there's already a PR about it: #135
If anyone wants to test out #135 , I would appreciate it.
I've been running it for some time, and AFAIK it works well :)
I'm going to test it right now! I'll post an update if my computer explodes.
I've found that there's an abysmal difference between the feature set of the both modules provided by this flake.
Why is it that you cannot change the permission, the persistentStorage path, etc... while in the home-manager module?
The most frustrating part is that, by default, all directory paths in the m-m mod. are relative to the the user home. Is there a reason for this?
It is a problem if you want to, for example, so things like this one:
Which can be very useful in a lot of situations.
Thanks for you're time and this project. :)