From 0321f754437582dfdefa117a01fb23960ccc3af9 Mon Sep 17 00:00:00 2001 From: Celes Renata Date: Sun, 10 Aug 2025 13:17:25 -0700 Subject: [PATCH] Fix Light mode selection in quickshell settings - Add gsettings-desktop-schemas for GNOME schema support on non-GNOME systems - Add libstdc++.so.6 support via stdenv.cc.cc.lib for Python packages - Include all required system libraries for Python virtual environment - Set XDG_DATA_DIRS to include GNOME schemas path - Reorganize Python environment configuration for better clarity This resolves the issue where Light mode couldn't be selected in the quickshell settings menu due to missing dependencies and library linking issues. --- modules/home-manager.nix | 14 ++++++++------ modules/python-environment.nix | 1 + packages/dots-hyprland-packages.nix | 13 +++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/modules/home-manager.nix b/modules/home-manager.nix index 17d85cc..bc3d819 100644 --- a/modules/home-manager.nix +++ b/modules/home-manager.nix @@ -81,6 +81,12 @@ in }; config = mkIf cfg.enable { + # Enable Python environment for color generation + programs.dots-hyprland.python = { + enable = true; + autoSetup = true; + }; + # Install packages based on selected set home.packages = let @@ -90,12 +96,6 @@ in else if cfg.packageSet == "essential" then packageSets.essentialPackages else packageSets.allPackages; - # Enable Python virtual environment (CRITICAL for both modes) - programs.dots-hyprland.python = { - enable = true; - autoSetup = true; - }; - # Enable configuration management based on mode programs.dots-hyprland.configuration = mkIf (cfg.mode == "declarative" || cfg.mode == "hybrid") { enable = mkDefault (cfg.mode == "hybrid"); # Enable copying for hybrid mode @@ -131,6 +131,8 @@ in # Set critical environment variables (required for both modes) home.sessionVariables = { ILLOGICAL_IMPULSE_VIRTUAL_ENV = "$HOME/.local/state/quickshell/.venv"; + # Ensure GNOME schemas are available for gsettings + XDG_DATA_DIRS = "$XDG_DATA_DIRS:${pkgs.gsettings-desktop-schemas}/share"; }; # Ensure ~/.local/bin is in PATH for our working qs script diff --git a/modules/python-environment.nix b/modules/python-environment.nix index 3bf4f2f..0cb743d 100644 --- a/modules/python-environment.nix +++ b/modules/python-environment.nix @@ -29,6 +29,7 @@ let # Set up proper library path for Python packages (64-bit only) export LD_LIBRARY_PATH="${lib.makeLibraryPath (with pkgs; [ + stdenv.cc.cc.lib # provides libstdc++.so.6 gcc-unwrapped.lib glibc zlib diff --git a/packages/dots-hyprland-packages.nix b/packages/dots-hyprland-packages.nix index d82d124..0a63a07 100644 --- a/packages/dots-hyprland-packages.nix +++ b/packages/dots-hyprland-packages.nix @@ -26,6 +26,7 @@ let widgetPackages = with pkgs; [ fuzzel glib # for gsettings + gsettings-desktop-schemas # GNOME schemas for non-GNOME environments hypridle hyprutils hyprlock @@ -71,6 +72,18 @@ let gobject-introspection sassc opencv4 # python-opencv + + # Additional system libraries needed for Python packages + stdenv.cc.cc.lib # provides libstdc++.so.6 + glibc + zlib + libffi + openssl + bzip2 + xz + ncurses + readline + sqlite ]; # Additional packages that might be needed