From 13849c7eff981ab2740bde5bcb0a87eeaee923e9 Mon Sep 17 00:00:00 2001 From: anthony Date: Wed, 15 Oct 2025 10:36:24 +0000 Subject: [PATCH] Revert "misc/gtk: move gtkrc-2.0" --- modules/collection/misc/gtk.nix | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/modules/collection/misc/gtk.nix b/modules/collection/misc/gtk.nix index 11eeb485..d3c6d2aa 100644 --- a/modules/collection/misc/gtk.nix +++ b/modules/collection/misc/gtk.nix @@ -5,7 +5,7 @@ ... }: let inherit (lib.options) literalExpression mkOption mkEnableOption; - inherit (lib.types) listOf package lines str path; + inherit (lib.types) listOf package lines str; inherit (lib.modules) mkIf mkRenamedOptionModule; inherit (lib.lists) optionals; inherit (lib.attrsets) optionalAttrs; @@ -58,17 +58,6 @@ in { [official GTK documentation]: https://docs.gtk.org/gtk3/class.Settings.html ''; }; - gtk2Location = mkOption { - type = path; - default = ".gtkrc-2.0"; - defaultText = "$HOME/.gtkrc-2.0"; - example = ".config/gtk-2.0/gtkrc"; - description = '' - The location relative to {env}`$HOME` to write the GTK-2.0 settings to. - By default, apps search at {file}`$HOME/.gtkrc-2.0`, but the environmental - variable {env}`GTK2_RC_FILES` can be set to a different location. - ''; - }; css = { gtk3 = mkOption { type = lines; @@ -117,12 +106,12 @@ in { inherit (cfg) packages; files = optionalAttrs (cfg.settings != {}) { - ${cfg.gtk2Location}.text = toGtk2Text {inherit (cfg) settings;}; + ".gtkrc-2.0".text = toGtk2Text {inherit (cfg) settings;}; }; xdg.config.files = ( optionalAttrs (cfg.settings != {}) { - ".config/gtk-3.0/settings.ini".text = toGtkINI {Settings = cfg.settings;}; - ".config/gtk-4.0/settings.ini".text = toGtkINI {Settings = cfg.settings;}; + "gtk-3.0/settings.ini".text = toGtkINI {Settings = cfg.settings;}; + "gtk-4.0/settings.ini".text = toGtkINI {Settings = cfg.settings;}; } // optionalAttrs (cfg.css.gtk3 != "") { "gtk-3.0/gtk.css".text = cfg.css.gtk3; @@ -137,7 +126,7 @@ in { # Set sessionVariables to load environment.sessionVariables = { - GTK2_RC_FILES = "${config.directory}/${cfg.gtk2Location}"; + GTK2_RC_FILES = "${config.directory}/.gtkrc-2.0"; GTK_THEME = mkIf (hasAttr "theme-name" cfg.settings) cfg.settings.theme-name; }; };