-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use xdg.systemDirs.config
instead of directly writing the files
#90
Comments
Oh a benefit not mentioned here. Settings changed in the settings panel can be left alone as well between updates. Perhaps there could be a setting in |
Interesting suggestion. This could work for some files I think but a lot of plasma files would need to be mutable as kde plasma writes to these files often even when not changing the settings I believe. Regarding |
I might be misunderstanding something here though, I haven't really heard of |
If what I understand correctly is that the nix store config-files will be read if they are present and ignore the |
The way xdg.systemDirs works is it adds the dirs given to the This means any settings in The idea here is this lets users safely apply their own changes on top of the config given by This is why a |
I can only speak about kate, but I know that the |
That's the benefit here. Of course we'd need to find out which programs do and don't listen to |
Wouldn't that then mean kate wouldn't be able to write to its config-file though as that is immutable (it's in the nix store after all). That could probably result in some errors. Or alternatively if it tries to write to Another problem is if the nix-store directory has a lower priority, then if the user already has config-files present in |
This is precisely why I mentioned a Of course, this is still modifying the |
@Noodlez1232 I do not think that would be a good idea. For example, kate would forget the recently opened files on each activation. In the current setup, plasma-manager overrides only those settings that are explicitly set and leaves everything else alone. That second part is important. If we could somehow make the first part permanent instead of setting it time and time again on each activation that would be perfect, but in the meantime the current solution is goos enough. |
I just thought of another way: (not sure if this belongs here) We could make the activationScript keep some, prespecified options. That means, reading the values from the old file and writing them to the new one. |
I wonder if we can modify the files and pull the options that are changed out of the files? So, if we change |
What happens if you mark a key as immutable in a systemDir? Does that override any settings in |
When writing the config files in
write_config.py
we can instead perhaps use something like this (mostly pseudocode):This moves the config files to the nix store, and allows them to be managed as such. Then any overwriting that wants to be done by the user can be done in their own dotfiles.
This leads to two main benefits:
To revert back to what is declaratively given, just simply remove the dot files in the .config directory.
Immutability and Reproducibility. This is the main benefit here. The files are then stored in the nix store, and therefore are managed by nix. (e.g. people having their nix store separately but shared, etc.)
The text was updated successfully, but these errors were encountered: