From d3f5d870e3f33f69fa6c0f9bcc44f8803a30e38e Mon Sep 17 00:00:00 2001 From: xezo360hye <79970533+xezo360hye@users.noreply.github.com> Date: Tue, 20 May 2025 18:04:16 +0300 Subject: [PATCH] home-manager: add force option for gtk-2 config (#7073) This adds gtk.gtk2.force enable option which maps directly onto home.files.${cfg2.configLocation}.force to allow overwrite of the gtkrc-2.0 file (workaround for bug #6188). --- modules/misc/gtk.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index 27d21a523..0287342e0 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -169,6 +169,8 @@ in The location to put the GTK configuration file. ''; }; + + force = lib.mkEnableOption "GTK 2 config force overwrite without creating a backup"; }; gtk3 = { @@ -294,10 +296,14 @@ in cfg.cursorTheme ]; - home.file.${cfg2.configLocation}.text = - lib.concatMapStrings (l: l + "\n") (lib.mapAttrsToList formatGtk2Option gtkIni) - + cfg2.extraConfig - + "\n"; + home.file.${cfg2.configLocation} = { + text = + lib.concatMapStrings (l: l + "\n") (lib.mapAttrsToList formatGtk2Option gtkIni) + + cfg2.extraConfig + + "\n"; + + inherit (cfg2) force; + }; home.sessionVariables.GTK2_RC_FILES = cfg2.configLocation;