1

Modules/Color: Configure iconTheme and cursor using color module

This commit is contained in:
2025-11-14 14:19:57 +01:00
parent a9a7115774
commit a27dc9859b
7 changed files with 240 additions and 182 deletions

View File

@ -50,10 +50,12 @@ in {
|> builtins.concatStringsSep "\n")
''echo ${lib.concatStrings (lib.replicate 20 "=")}''
]);
in [
applyColors
printNixColors
];
in
[
applyColors
printNixColors
]
++ color.extraPackages;
# This module sets its own options to the values specified in a colorscheme file.
modules.color = let

View File

@ -50,6 +50,38 @@ in rec {
default = "JetBrainsMono Nerd Font Mono";
};
cursor = lib.mkOption {
type = lib.types.str;
description = "The cursor to use";
example = "Bibata-Modern-Classic";
default = "Bibata-Modern-Classic";
};
cursorSize = lib.mkOption {
type = lib.types.int;
description = "The cursor size";
example = 24;
default = 24;
};
iconTheme = lib.mkOption {
type = lib.types.str;
description = "The icon theme to use";
example = "Papirus";
default = "Papirus";
};
extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
description = "Extra packages to install";
example = ''
[
pkgs.bibata-cursors
]
'';
default = [];
};
# This option is set automatically
wallpapers = let
# Collect all the available wallpapers.

View File

@ -38,17 +38,21 @@ in {
gtk = {
enable = true;
iconTheme.package = pkgs.papirus-icon-theme;
iconTheme.name = "Papirus";
# iconTheme.package = lib.mkDefault pkgs.papirus-icon-theme;
iconTheme.name = color.iconTheme;
};
modules = {
hyprpanel.enable = hyprland.hyprpanel.enable;
};
home = {
pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
gtk.enable = lib.mkDefault true;
x11.enable = lib.mkDefault true;
# package = lib.mkDefault pkgs.bibata-cursors;
name = color.cursor;
size = color.cursorSize;
};
packages = with pkgs; [
@ -113,10 +117,10 @@ in {
programs = {
hyprlock = import ./hyprlock.nix {inherit config hyprland color;};
caelestia = import ./caelestia.nix {inherit config hyprland color;};
};
services = {
# TODO: Dunst shouldn't be part of the hyprland module
dunst = import ./dunst.nix {inherit pkgs config hyprland color;};
hypridle = import ./hypridle.nix {inherit config hyprland color;};
hyprpaper = import ./hyprpaper.nix {inherit config hyprland color;};

View File

@ -6,8 +6,8 @@
}: {
enable = hyprland.dunst.enable;
iconTheme.package = pkgs.papirus-icon-theme;
iconTheme.name = "Papirus";
# iconTheme.package = pkgs.papirus-icon-theme;
iconTheme.name = color.iconTheme;
settings = {
global = {

View File

@ -3,6 +3,7 @@
nixosConfig,
lib,
mylib,
inputs,
pkgs,
...
}: let
@ -18,11 +19,24 @@ in {
}
];
gtk = {
enable = true;
# iconTheme.package = pkgs.papirus-icon-theme;
iconTheme.name = color.iconTheme;
};
home = {
sessionVariables = {
# For Noctalia
# QS_ICON_THEME = "Papirus";
QT_QPA_PLATFORMTHEME = "gtk3";
QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia
GDK_BACKEND = "wayland"; # For screen sharing
};
pointerCursor = {
gtk.enable = true;
x11.enable = true;
# package = inputs.waifu-cursors.packages.${pkgs.system}.all;
name = color.cursor;
size = color.cursorSize;
};
packages = with pkgs; [
@ -132,8 +146,8 @@ in {
cursor = {
hide-when-typing = true;
theme = "Bibata-Modern-Classic";
size = 24;
theme = color.cursor;
size = color.cursorSize;
};
layout = {