SUMMARY allow to override kde default settings with global config files in /etc/kde/ ACTUAL currently, the default settings of kde modules are hard-coded and that default config can only be changed per user ($HOME/.config/) but not system-wide = for all users (/etc/kde/) example: baloo default config: baloo-5.93.0/src/lib/baloosettings.kcfg user config: $HOME/.config/baloofilerc ```xml <!-- baloo-5.93.0/src/lib/baloosettings.kcfg --> <kcfgfile name="baloofilerc" /> <group name="Basic Settings"> <entry name="indexingEnabled" key="Indexing-Enabled" type="Bool"> <label>Indexing-Enabled</label> <default>true</default> </entry> </group> <entry name="onlyBasicIndexing" key="only basic indexing" type="Bool"> <label>only basic indexing</label> <default>false</default> </entry> ``` EXPECTED let distributors and users have global config files in /etc/kde/ example: /etc/kde/baloofilerc config resolution: 1. use the hard-coded settings for "baloofilerc" 2. if /etc/kde/baloofilerc exists, merge settings 3. if $HOME/.config/baloofilerc exists, merge settings CONTEXT related downstream issue: option request: services.baloo.enable https://github.com/NixOS/nixpkgs/issues/63489 SOFTWARE/OS VERSIONS KDE Plasma Version: plasma-desktop-5.26.2 KDE Frameworks Version: Qt Version:
kcfg files are not default config files kconfig properly respects the $XDG_DATA_DIRS hierachy. I.e. on most distros default config can be provided in /etc/xdg
i tried ``` balooctl disable # Disabling and stopping the File Indexer balooctl status # Baloo is currently disabled. To enable, please run balooctl enable rm ~/.config/baloofilerc sudo mkdir /etc/xdg sudo cat >/etc/xdg/baloofilerc <<EOF [Basic Settings] Indexing-Enabled=false EOF balooctl status # Baloo Index could not be opened ``` expected: the second `balooctl status` should also say > Baloo is currently disabled. To enable, please run balooctl enable i did not try to restart plasma-desktop but i guess it will ignore /etc/xdg/baloofilerc and start baloo which is "default on" per baloo-5.93.0/src/lib/baloosettings.kcfg
(In reply to milahu from comment #0) > CONTEXT > related downstream issue: > option request: services.baloo.enable > https://github.com/NixOS/nixpkgs/issues/63489 (In reply to David Redondo from comment #1) > kconfig properly respects the $XDG_DATA_DIRS hierachy. I.e. on most distros > default config can be provided in /etc/xdg This might be answering a different question (and I'm not deep into Nixos), but this would create an /etc/xdg/baloofilerc file that disables baloo by default if you have it in your configuration.nix environment.etc = { "xdg/baloofilerc" = { text = '' [Basic Settings] Indexing-Enabled=false ''; mode = "0644"; }; }; Alas, don't know what you would do to do it with flakes...