Disable persistency in workspace module when not using overrideConfig (#178)

This commit is contained in:
magnouvean 2024-05-28 15:23:27 +02:00 committed by GitHub
parent 4d38fc602e
commit 4a255e5ea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,11 +171,13 @@ in
};
# We add persistence to some keys in order to not reset the themes on
# each generation when we use overrideConfig.
programs.plasma.configFile.kcminputrc.Mouse.cursorTheme.persistent = lib.mkDefault (cfg.workspace.cursorTheme != null);
programs.plasma.configFile.kdeglobals.General.ColorScheme.persistent = lib.mkDefault (cfg.workspace.colorScheme != null);
programs.plasma.configFile.kdeglobals.Icons.Theme.persistent = lib.mkDefault (cfg.workspace.iconTheme != null);
programs.plasma.configFile.kdeglobals.KDE.LookAndFeelPackage.persistent = lib.mkDefault (cfg.workspace.lookAndFeel != null);
programs.plasma.configFile.plasmarc.Theme.name.persistent = lib.mkDefault (cfg.workspace.theme != null);
programs.plasma.configFile = lib.mkIf (cfg.overrideConfig) {
kcminputrc.Mouse.cursorTheme.persistent = lib.mkDefault (cfg.workspace.cursorTheme != null);
kdeglobals.General.ColorScheme.persistent = lib.mkDefault (cfg.workspace.colorScheme != null);
kdeglobals.Icons.Theme.persistent = lib.mkDefault (cfg.workspace.iconTheme != null);
kdeglobals.KDE.LookAndFeelPackage.persistent = lib.mkDefault (cfg.workspace.lookAndFeel != null);
plasmarc.Theme.name.persistent = lib.mkDefault (cfg.workspace.theme != null);
};
})
(lib.mkIf (cfg.workspace.wallpaper != null) {
# We need to set the wallpaper after the panels are created in order for