nixos/gtk.iconCache: Disable by default#50453
Conversation
|
Won't this break people's setups unless we automatically enable the module when it is needed? |
|
Oh, um good point.. Maybe it should be conditional on |
|
I didn't realize this would happen with that PR! I think the issue comes from the usage of Thanks for tracking this down! I think this PR is good as is, although it would be nice to have the module enabled when icons are expected to be in systemPackages though. |
|
Right, |
|
I was going to make a PR where From 0551eb95b77b97b04ceb4fe0d81d16d8151e2602 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Sat, 17 Nov 2018 08:29:31 -0200
Subject: [PATCH] nixos gtk.iconCache.enable: default on X11 and wayland
---
nixos/modules/config/gtk/gtk-icon-cache.nix | 8 ++++++--
nixos/modules/programs/sway-beta.nix | 4 ++++
nixos/modules/programs/sway.nix | 5 +++++
nixos/modules/programs/way-cooler.nix | 4 ++++
nixos/modules/services/x11/xserver.nix | 4 ++++
5 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/nixos/modules/config/gtk/gtk-icon-cache.nix b/nixos/modules/config/gtk/gtk-icon-cache.nix
index d4e0cf97c66..37abe7608f7 100644
--- a/nixos/modules/config/gtk/gtk-icon-cache.nix
+++ b/nixos/modules/config/gtk/gtk-icon-cache.nix
@@ -5,9 +5,13 @@ with lib;
options = {
gtk.iconCache.enable = mkOption {
type = types.bool;
- default = true;
+ default = false;
description = ''
- Whether to build icon theme caches for GTK+ applications.
+ Whether to build icon theme caches for GTK+ applications. It is
+ disabled in general, and enabled (in the corresponding module) for
+ systems that are GTK+ backends, like X11 and wayland. You do not
+ usually have to set it yourself, only if there is no module for the
+ GDK backend you want to use.
'';
};
};
diff --git a/nixos/modules/programs/sway-beta.nix b/nixos/modules/programs/sway-beta.nix
index e651ea4cca3..06629bb0aac 100644
--- a/nixos/modules/programs/sway-beta.nix
+++ b/nixos/modules/programs/sway-beta.nix
@@ -73,6 +73,10 @@ in {
hardware.opengl.enable = mkDefault true;
fonts.enableDefaultFonts = mkDefault true;
programs.dconf.enable = mkDefault true;
+
+ # Enable icon theme cache generation for GTK+ applications
+ # (wayland is one of the backends for GTK+ applications)
+ gtk.iconCache.enable = true;
};
meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ];
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
index 0eaaf6b85b9..d9c315c9105 100644
--- a/nixos/modules/programs/sway.nix
+++ b/nixos/modules/programs/sway.nix
@@ -79,6 +79,11 @@ in {
hardware.opengl.enable = mkDefault true;
fonts.enableDefaultFonts = mkDefault true;
programs.dconf.enable = mkDefault true;
+
+ # Enable icon theme cache generation for GTK+ applications
+ # (wayland is one of the backends for GTK+ applications)
+ gtk.iconCache.enable = true;
+
};
meta.maintainers = with lib.maintainers; [ gnidorah primeos ];
diff --git a/nixos/modules/programs/way-cooler.nix b/nixos/modules/programs/way-cooler.nix
index 633e959be9f..68be7de0747 100644
--- a/nixos/modules/programs/way-cooler.nix
+++ b/nixos/modules/programs/way-cooler.nix
@@ -72,6 +72,10 @@ in
hardware.opengl.enable = mkDefault true;
fonts.enableDefaultFonts = mkDefault true;
programs.dconf.enable = mkDefault true;
+
+ # Enable icon theme cache generation for GTK+ applications
+ # (wayland is one of the backends for GTK+ applications)
+ gtk.iconCache.enable = true;
};
meta.maintainers = with maintainers; [ gnidorah ];
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 34ae8c11a3f..ae2e919bf05 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -639,6 +639,10 @@ in
icons.enable = true;
};
+ # Enable icon theme cache generation for GTK+ applications (X11 is
+ # one of the backends for GTK+ applications)
+ gtk.iconCache.enable = true;
+
# The default max inotify watches is 8192.
# Nowadays most apps require a good number of inotify watches,
# the value below is used by default on several other distros.
--
2.19.1@vcunat Should I submit it? |
Motivation for this change
Unblock the installer tests.
Discussion has been taking place (#48116) on how to default enable this in eg. xserver.enable or something similar, but as far as I can tell nothing has been concluded yet. Meanwhile, on a barebones system this should surely be false, so this seems like the right default in the module itself.
cc @romildo @matthewbauer
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)