impermanence
impermanence copied to clipboard
feature request: add wildcard matching
I would like to persist all directories that follow a specific pattern.
Here's an example:
environment.persistence."/nix/persist".users."testuser" = {
files = [
# persist all .txt files in the directory
".cache/test/*.txt"
];
directories = [
# persist all extension data, do not persist website data (which is stored in the same dir)
".mozilla/firefox/default/storage/default/moz-extension+++*"
];
};
I would love to see this! What would I have to do to make this a reality @talyz?
I've thought about it a bit more.
The only way I can think of realizing this is by creating a service for each wildcard that dynamically bindmounts matches at runtime - since we can't really know what would eventually get matched.
Since imperanence is all about "purity", would we even want to introduce such a feature?
Nonetheless, I'd love to see something like this working. Does anyone have an idea on how to solve this problem more elegantly?
I would also love to see this! When I have the time I will look into implementing it, but I cannot make that time in the immediate future.