From 5b22fd95f1efb1c1ed18ac0cde16a3fe2a4eb99a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 14 Aug 2026 01:13:09 +0200 Subject: modules/gtk: Migrate to by-name and use stable pkgs for themes The themes are no longer in unstable, but I believe they might get added again. --- modules/by-name/gt/gtk/module.nix | 82 ++++++++++++++++++++++++++++++++ modules/home.legacy/conf/default.nix | 1 - modules/home.legacy/conf/gtk/default.nix | 67 -------------------------- 3 files changed, 82 insertions(+), 68 deletions(-) create mode 100644 modules/by-name/gt/gtk/module.nix delete mode 100644 modules/home.legacy/conf/gtk/default.nix diff --git a/modules/by-name/gt/gtk/module.nix b/modules/by-name/gt/gtk/module.nix new file mode 100644 index 00000000..44442077 --- /dev/null +++ b/modules/by-name/gt/gtk/module.nix @@ -0,0 +1,82 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + config, + pkgs, + lib, + packageSets, + libraries, + ... +}: let + cfg = config.soispha.gtk; + + homeConfig = config.home-manager.users.soispha; +in { + options.soispha.gtk = { + enable = libraries.base.options.mkEnable "gtk themes"; + }; + + config.home-manager.users.soispha = lib.mkIf cfg.enable { + gtk = { + enable = true; + theme = { + # NOTE: The `nordic` package pulls the whole plasma shell, to copy some stuff from a plasma theme :/ <2026-05-29> + # NOTE: Unstable removed the nordic theme, as it also supported gtk2, which is + # insecure. So we use stable until unstable adds it again. <2026-08-13> + package = packageSets.stable.nordic; + name = "Nordic"; + }; + cursorTheme = { + package = pkgs.nordzy-cursor-theme; + name = "Nordzy-cursors"; + }; + iconTheme = { + package = pkgs.nordzy-icon-theme; + name = "Nordzy-icon"; + }; + font = { + name = "Noto Sans"; + size = 10; + }; + gtk2 = { + configLocation = "${homeConfig.xdg.configHome}/gtk-2.0/gtkrc"; + # extraConfig = '' + # gtk-enable-animations=1 + # gtk-primary-button-warps-slider=0 + # gtk-toolbar-style=3 + # gtk-menu-images=1 + # gtk-button-images=1 + # + # ''; + }; + gtk3 = { + # extraConfig = '' + # gtk-button-images=true + # gtk-decoration-layout=icon:minimize,maximize,close + # gtk-enable-animations=true + # gtk-menu-images=true + # gtk-primary-button-warps-slider=false + # gtk-toolbar-style=3 + # #gtk-modules=window-decorations-gtk-module:colorreload-gtk-module + # ''; + extraCss = ""; + }; + gtk4 = { + theme = homeConfig.gtk.theme; + # extraConfig = '' + # gtk-application-prefer-dark-theme=true + # gtk-decoration-layout=icon:minimize,maximize,close + # gtk-enable-animations=true + # gtk-primary-button-warps-slider=false + # ''; + }; + }; + }; +} diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index b50068ea..9af67102 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -13,7 +13,6 @@ ./btop ./dconf ./gammastep - ./gtk ./himalaya ./keepassxc ./mail diff --git a/modules/home.legacy/conf/gtk/default.nix b/modules/home.legacy/conf/gtk/default.nix deleted file mode 100644 index e624765b..00000000 --- a/modules/home.legacy/conf/gtk/default.nix +++ /dev/null @@ -1,67 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - config, - pkgs, - ... -}: { - gtk = { - enable = true; - theme = { - # NOTE: The `nordic` package pulls the whole plasma shell, to copy some stuff from a plasma theme :/ <2026-05-29> - package = pkgs.nordic; - name = "Nordic"; - }; - cursorTheme = { - package = pkgs.nordzy-cursor-theme; - name = "Nordzy-cursors"; - }; - iconTheme = { - package = pkgs.nordzy-icon-theme; - name = "Nordzy-icon"; - }; - font = { - name = "Noto Sans"; - size = 10; - }; - gtk2 = { - configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - # extraConfig = '' - # gtk-enable-animations=1 - # gtk-primary-button-warps-slider=0 - # gtk-toolbar-style=3 - # gtk-menu-images=1 - # gtk-button-images=1 - # - # ''; - }; - gtk3 = { - # extraConfig = '' - # gtk-button-images=true - # gtk-decoration-layout=icon:minimize,maximize,close - # gtk-enable-animations=true - # gtk-menu-images=true - # gtk-primary-button-warps-slider=false - # gtk-toolbar-style=3 - # #gtk-modules=window-decorations-gtk-module:colorreload-gtk-module - # ''; - extraCss = ""; - }; - gtk4 = { - theme = config.gtk.theme; - # extraConfig = '' - # gtk-application-prefer-dark-theme=true - # gtk-decoration-layout=icon:minimize,maximize,close - # gtk-enable-animations=true - # gtk-primary-button-warps-slider=false - # ''; - }; - }; -} -- cgit v1.3.1