aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-08-14 01:13:09 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-08-14 01:17:06 +0200
commit5b22fd95f1efb1c1ed18ac0cde16a3fe2a4eb99a (patch)
tree5feff12e0e4ca9adf87984b3698fc729946133f5 /modules
parentinputs.nix: Add dependency de-duplication rules (diff)
downloadnixos-config-5b22fd95f1efb1c1ed18ac0cde16a3fe2a4eb99a.zip
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.
Diffstat (limited to '')
-rw-r--r--modules/by-name/gt/gtk/module.nix82
-rw-r--r--modules/home.legacy/conf/default.nix1
-rw-r--r--modules/home.legacy/conf/gtk/default.nix67
3 files changed, 82 insertions, 68 deletions
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 <benedikt.peetz@b-peetz.de>
+# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>.
+{
+ 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 <benedikt.peetz@b-peetz.de>
-# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>.
-{
- 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
- # '';
- };
- };
-}