extend cursor themeing to overall themeing

sh-initrd-on-root
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, ... }: { pkgs, lib, config, ... }:
let let
cfg = config.snowhawk.cursor; cfg = config.snowhawk.theme;
in in
{ {
options.snowhawk.cursor = { options.snowhawk.theme = {
enable = lib.mkEnableOption "cursor"; enable = lib.mkEnableOption "theme";
cursor = lib.mkEnableOption "home.pointerCursor theme";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.pointerCursor = gtk = {
let enable = true;
getFrom = url: hash: name: { theme = {
gtk.enable = true; package = pkgs.rose-pine-gtk-theme;
x11.enable = true; name = "rose-pine";
name = name; };
size = 16; iconTheme = {
package = package = pkgs.rose-pine-icon-theme;
pkgs.runCommand "moveUp" { } '' name = "rose-pine-icons";
mkdir -p $out/share/icons };
ln -s ${pkgs.fetchzip { };
url = url;
hash = hash; # Set system dark mode
}} $out/share/icons/${name} dconf.settings = {
''; "org/freedesktop/appearance" = {
}; color-scheme = 1;
in };
getFrom "org/gnome/desktop/interface" = {
"https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" color-scheme = "prefer-dark";
"sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" };
"BreezeX-RosePine"; };
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; package = inputs.neovim-overlay.packages.${pkgs.system}.default;
}; };
snowhawk.alacritty.enable = true; snowhawk.alacritty.enable = true;
snowhawk.cursor.enable = true; snowhawk.theme.enable = true;
snowhawk.projects.enable = true; snowhawk.projects.enable = true;
snowhawk.lazygit.enable = true; snowhawk.lazygit.enable = true;
@ -54,28 +54,6 @@
# dotnet-sdk_8 # 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 = { }; home.file = { };
# wayland.windowManager.hyprland = { # wayland.windowManager.hyprland = {