From 0980fe529700dbdab302635ec73283b37a1b33e5 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Fri, 14 Nov 2025 14:30:46 +0100 Subject: [PATCH] Modules/Color: Add options for icon and cursor packages --- home/christoph/default.nix | 3 +++ home/modules/color/default.nix | 4 +++- home/modules/color/options.nix | 15 +++++++++++++++ home/modules/hyprland/default.nix | 8 ++++++-- home/modules/hyprland/dunst.nix | 2 +- home/modules/niri/default.nix | 4 ++-- home/modules/rofi/default.nix | 2 +- 7 files changed, 31 insertions(+), 7 deletions(-) diff --git a/home/christoph/default.nix b/home/christoph/default.nix index 9a2b934a..df675573 100644 --- a/home/christoph/default.nix +++ b/home/christoph/default.nix @@ -63,7 +63,9 @@ in font = builtins.head nixosConfig.fonts.fontconfig.defaultFonts.monospace; cursor = "miku-cursor-linux"; cursorSize = 64; + cursorPackage = inputs.waifu-cursors.packages.${pkgs.system}.all; iconTheme = "Papirus"; + iconPackage = pkgs.papirus-icon-theme; wallpaper = "Windows"; accent = "mauve"; @@ -100,6 +102,7 @@ in trails.enable = true; hyprspace.enable = false; # Always broken hyprpanel.enable = false; + caelestia.enable = true; keybindings = { main-mod = "SUPER"; diff --git a/home/modules/color/default.nix b/home/modules/color/default.nix index f43527f8..1331c196 100644 --- a/home/modules/color/default.nix +++ b/home/modules/color/default.nix @@ -7,7 +7,7 @@ }: let inherit (config.modules) color; in { - options.modules.color = import ./options.nix {inherit lib mylib;}; + options.modules.color = import ./options.nix {inherit lib mylib pkgs;}; config = { home.packages = let @@ -54,6 +54,8 @@ in { [ applyColors printNixColors + color.iconPackage + color.cursorPackage ] ++ color.extraPackages; diff --git a/home/modules/color/options.nix b/home/modules/color/options.nix index d5a6101e..1e81d6f2 100644 --- a/home/modules/color/options.nix +++ b/home/modules/color/options.nix @@ -1,6 +1,7 @@ { lib, mylib, + pkgs, ... }: let colorKeys = [ @@ -64,6 +65,13 @@ in rec { default = 24; }; + cursorPackage = lib.mkOption { + type = lib.types.package; + description = "The cursor package"; + example = pkgs.bibata-cursors; + default = pkgs.bibata-cursors; + }; + iconTheme = lib.mkOption { type = lib.types.str; description = "The icon theme to use"; @@ -71,6 +79,13 @@ in rec { default = "Papirus"; }; + iconPackage = lib.mkOption { + type = lib.types.package; + description = "The icon theme package"; + example = pkgs.papirus-icon-theme; + default = pkgs.papirus-icon-theme; + }; + extraPackages = lib.mkOption { type = lib.types.listOf lib.types.package; description = "Extra packages to install"; diff --git a/home/modules/hyprland/default.nix b/home/modules/hyprland/default.nix index 11704737..192aa779 100644 --- a/home/modules/hyprland/default.nix +++ b/home/modules/hyprland/default.nix @@ -34,11 +34,15 @@ in { assertion = builtins.hasAttr "hyprlock" nixosConfig.security.pam.services; message = "Can't enable Hyprland module without Hyprlock PAM service!"; } + { + assertion = hyprland.hyprpanel.enable != hyprland.caelestia.enable; + message = "Can't enable Hyprpanel and Caelestia at the same time!"; + } ]; gtk = { enable = true; - # iconTheme.package = lib.mkDefault pkgs.papirus-icon-theme; + iconTheme.package = lib.mkDefault color.iconPackage; iconTheme.name = color.iconTheme; }; @@ -50,7 +54,7 @@ in { pointerCursor = { gtk.enable = lib.mkDefault true; x11.enable = lib.mkDefault true; - # package = lib.mkDefault pkgs.bibata-cursors; + package = lib.mkDefault color.cursorPackage; name = color.cursor; size = color.cursorSize; }; diff --git a/home/modules/hyprland/dunst.nix b/home/modules/hyprland/dunst.nix index c28d6976..ec5021ab 100644 --- a/home/modules/hyprland/dunst.nix +++ b/home/modules/hyprland/dunst.nix @@ -6,7 +6,7 @@ }: { enable = hyprland.dunst.enable; - # iconTheme.package = pkgs.papirus-icon-theme; + iconTheme.package = color.iconPackage; iconTheme.name = color.iconTheme; settings = { diff --git a/home/modules/niri/default.nix b/home/modules/niri/default.nix index a315a6ac..6f04a34a 100644 --- a/home/modules/niri/default.nix +++ b/home/modules/niri/default.nix @@ -21,7 +21,7 @@ in { gtk = { enable = true; - # iconTheme.package = pkgs.papirus-icon-theme; + iconTheme.package = color.iconPackage; iconTheme.name = color.iconTheme; }; @@ -34,7 +34,7 @@ in { pointerCursor = { gtk.enable = true; x11.enable = true; - # package = inputs.waifu-cursors.packages.${pkgs.system}.all; + package = color.cursorPackage; name = color.cursor; size = color.cursorSize; }; diff --git a/home/modules/rofi/default.nix b/home/modules/rofi/default.nix index 1a1cba97..268a700b 100644 --- a/home/modules/rofi/default.nix +++ b/home/modules/rofi/default.nix @@ -24,7 +24,7 @@ in { extraConfig = { modi = "run,drun,ssh,filebrowser"; show-icons = true; - icon-theme = "Papirus"; + icon-theme = color.iconTheme; drun-display-format = "{icon} {name}"; disable-history = false; hide-scrollbar = true;