1

Modules/Color: Add options for icon and cursor packages

This commit is contained in:
2025-11-14 14:30:46 +01:00
parent 84d93f3968
commit 0980fe5297
7 changed files with 31 additions and 7 deletions

View File

@ -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";

View File

@ -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;

View File

@ -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";

View File

@ -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;
};

View File

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

View File

@ -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;
};

View File

@ -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;