aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/gt/gtk/module.nix
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/by-name/gt/gtk/module.nix
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 'modules/by-name/gt/gtk/module.nix')
-rw-r--r--modules/by-name/gt/gtk/module.nix82
1 files changed, 82 insertions, 0 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
+ # '';
+ };
+ };
+ };
+}