Skip to content
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

Upcoming breaking change regarding configGroupNesting #93

Closed
magnouvean opened this issue Mar 23, 2024 · 1 comment
Closed

Upcoming breaking change regarding configGroupNesting #93

magnouvean opened this issue Mar 23, 2024 · 1 comment

Comments

@magnouvean
Copy link
Collaborator

magnouvean commented Mar 23, 2024

Edit: After #94 the format has changed again. The rest of comment has been updated to address this.

There are two new changes regarding the format of configurations for the file module. One is that all keys in configFile, dataFile and file require the value property, meaning, for example. what before was:

programs.plasma = {
  configFile = {
    "krunnerrc"."General"."FreeFloating" = true;
    "kwinrc"."Desktops"."Number" = 8;
    "kwinrc"."Desktops"."Rows" = 2;
  };
};

now must be:

programs.plasma = {
  configFile = {
    "krunnerrc"."General"."FreeFloating".value = true;
    "kwinrc"."Desktops"."Number".value = 8;
    "kwinrc"."Desktops"."Rows".value = 2;
  };
};

We also had to remove the recursive attribute config format (even though it was newly introduced), because it had some limitations with extensibility.

The other difference is that the new delimiter for nested groups is /, which was changed from .. This means that where you before had:

programs.plasma.configFile."group.subgroup1.subgroup2"."key" = "value";

you now will have to use:

programs.plasma.configFile."group/subgroup1/subgroup2"."key".value = "value";

This also means that if you don't have to escape periods anymore, they can just be left as is, but if you for some reason need / in your groups, you can escape this by part1\\/part2\\/part3, which will translate to a group named part1/part2/part3 (not that there should be any reason to have / in your groups for kde plasma config-files anyway).

@magnouvean magnouvean pinned this issue Mar 23, 2024
@magnouvean
Copy link
Collaborator Author

Thanks to #144 by @quentinmit you now can skip the .value part of the key if you don't want to tweak immutability or persistence or other attributes. In other words

programs.plasma.configFile.group.key = "value";

will be equivalent to

programs.plasma.configFile.group.key.value = "value";

I also said in another issue that I would step aside from the project due to switching distros, but that probably won't happen anyway as I did find out:

  1. An OK solution to my software needs (for development)
  2. Other distros are hardly good options for my needs as well

In other words I'll continue to be involved in the project in the future :)

I'll close this now since this isn't all that relevant anymore with the latest addition.

@magnouvean magnouvean unpinned this issue Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant