Closed Mathew-D closed 3 years ago
Hi @boredland @Mathew-D sorry I'm so late to the party currently on vacation. What if we would give an option to make it easier to build the project with a different default_config? Would that solve the problem? Im not sure how user-config.toml would make dotfiles easier.. It would be easier to have have just one config file in my opinion.
Cudos btw for being the first pr on this repo ;)
The main reason for a second config is that a custom one can be set by a setting package which will be updated by Linux distribution but the second one will only be changed by the user and will not be replaced every time the setting package is updated.
Is this a known pattern for configs? So then config.toml will be more of an constantly updating fallback instead of the only config? Wouldn't it be better for distros to bake in the default config? And still just leave one file? There kind of is no point to having two config files if one will be overwritten and handled by the package manager.
Wouldn't it be better for distros to bake in the default config?
while I personally agree, I think there is scenarios for both files:
reg. 2. I think this solution doesn"t cover this completely, because imo we'd basically need to filter out duplicates and keep only every last entry, so we could support "overrides". clearly not a high priority though.
Okay so lets not give users a config file maintained by the distro. Lets just use the default_config.toml together with config.toml. and make it easier for package maintainers to change default_config.toml to a desired state.
This way you can have an ever changing default config specific per distro while always preferring user config over default.
So two changes needed:
But that way, you'd loose the option to "update" the "os part" later.
I'm not sure if I understand. But a package maintainer can still update default_config.toml henceforth it can update the "os part"
sorry, I over-read parts of your comment.
I hate to say it but what you are asking for is above what I can program in rust as I normally only program in Java.
@Mathew-D no problem thanks for putting time into this as far as you have. It helped with the discussion!
@boredland I'm not sure if you're able to implement this otherwise I'll be able to work on this but only after a minimum of a week. Can't release anyways untill I'm back home..
Pull #13 closes this.
Add a second config file called: user-config.toml. This allows linux distribution to prepackage a config file and users to add there extras to another file for easier updates of dotfiles