extend cursor themeing to overall themeing

main
Zynh Ludwig 2024-07-01 12:45:18 -07:00
parent a450a41293
commit f57051cca7
2 changed files with 51 additions and 47 deletions

View File

@ -1,34 +1,60 @@
{ pkgs, lib, config, ... }:
let
cfg = config.snowhawk.cursor;
cfg = config.snowhawk.theme;
in
{
options.snowhawk.cursor = {
enable = lib.mkEnableOption "cursor";
options.snowhawk.theme = {
enable = lib.mkEnableOption "theme";
cursor = lib.mkEnableOption "home.pointerCursor theme";
};
config = lib.mkIf cfg.enable {
home.pointerCursor =
let
getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 16;
package =
pkgs.runCommand "moveUp" { } ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip {
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
};
in
getFrom
"https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz"
"sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c="
"BreezeX-RosePine";
gtk = {
enable = true;
theme = {
package = pkgs.rose-pine-gtk-theme;
name = "rose-pine";
};
iconTheme = {
package = pkgs.rose-pine-icon-theme;
name = "rose-pine-icons";
};
};
# Set system dark mode
dconf.settings = {
"org/freedesktop/appearance" = {
color-scheme = 1;
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
home.pointerCursor = lib.mkIf cfg.cursor
(
let
getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 16;
package =
pkgs.runCommand "moveUp" { } ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip {
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
};
in
getFrom
"https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz"
"sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c="
"BreezeX-RosePine"
);
};
}

View File

@ -10,7 +10,7 @@
package = inputs.neovim-overlay.packages.${pkgs.system}.default;
};
snowhawk.alacritty.enable = true;
snowhawk.cursor.enable = true;
snowhawk.theme.enable = true;
snowhawk.projects.enable = true;
snowhawk.lazygit.enable = true;
@ -54,28 +54,6 @@
# dotnet-sdk_8
];
gtk = {
enable = true;
theme = {
package = pkgs.rose-pine-gtk-theme;
name = "rose-pine";
};
iconTheme = {
package = pkgs.rose-pine-icon-theme;
name = "rose-pine-icons";
};
};
# Set system dark mode
dconf.settings = {
"org/freedesktop/appearance" = {
color-scheme = 1;
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
home.file = { };
# wayland.windowManager.hyprland = {