mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
gtk2: add force option
Add a gtk.gtk2.force option so that users can force overwrite the configuration file if other applications (e.g. KDE Plasma) updates them.
This commit is contained in:
parent
40ab43ae98
commit
dae1d1a875
1 changed files with 14 additions and 3 deletions
|
@ -139,6 +139,14 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk2 = {
|
gtk2 = {
|
||||||
|
force = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to force replace the existing configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -269,9 +277,12 @@ in {
|
||||||
cfg.cursorTheme
|
cfg.cursorTheme
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file.${cfg2.configLocation}.text =
|
home.file.${cfg2.configLocation} = {
|
||||||
|
force = cfg2.force;
|
||||||
|
text =
|
||||||
concatMapStrings (l: l + "\n") (mapAttrsToList formatGtk2Option gtkIni)
|
concatMapStrings (l: l + "\n") (mapAttrsToList formatGtk2Option gtkIni)
|
||||||
+ cfg2.extraConfig + "\n";
|
+ cfg2.extraConfig + "\n";
|
||||||
|
};
|
||||||
|
|
||||||
home.sessionVariables.GTK2_RC_FILES = cfg2.configLocation;
|
home.sessionVariables.GTK2_RC_FILES = cfg2.configLocation;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue