feat(gui): add catppuccin gtk and cursor themes
This commit is contained in:
parent
b54d9e00af
commit
a4096481a0
|
@ -4,23 +4,6 @@
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
cfg = config.passthrough.gnome;
|
cfg = config.passthrough.gnome;
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
# cursor theme
|
|
||||||
home.pointerCursor = {
|
|
||||||
package = pkgs.catppuccin-cursors.frappeDark;
|
|
||||||
name = "Catppuccin-Frappe-Dark-Cursors";
|
|
||||||
};
|
|
||||||
|
|
||||||
# gtk theme
|
|
||||||
gtk.theme = {
|
|
||||||
package = pkgs.catppuccin-gtk.override {
|
|
||||||
accents = [ "pink" ];
|
|
||||||
size = "compact";
|
|
||||||
#tweaks = [ "rimless" "black" ];
|
|
||||||
variant = "frappe";
|
|
||||||
};
|
|
||||||
name = "Catppuccin-Frappe-Compact-Pink-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages =
|
home.packages =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
with gnome;
|
with gnome;
|
||||||
|
|
13
home/gui/catppuccin/home.nix
Normal file
13
home/gui/catppuccin/home.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ... }: with lib; let
|
||||||
|
cfg = config.passthrough.catppuccin;
|
||||||
|
in mkIf cfg.enable {
|
||||||
|
# cursor theme
|
||||||
|
home.pointerCursor = { inherit (cfg.cursor) package name; };
|
||||||
|
gtk.cursorTheme = { inherit (cfg.cursor) package name; };
|
||||||
|
|
||||||
|
# gtk theme
|
||||||
|
gtk.theme = { inherit (cfg.gtk) package name; };
|
||||||
|
}
|
64
home/gui/catppuccin/nixos.nix
Normal file
64
home/gui/catppuccin/nixos.nix
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ... }: with lib; let
|
||||||
|
gui = with config.global.gpu; enable && session;
|
||||||
|
cfg = config.home.catppuccin;
|
||||||
|
in {
|
||||||
|
options.home.catppuccin = {
|
||||||
|
enable = mkEnableOption "catppuccin colour scheme" // { default = gui; };
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
package = mkOption {
|
||||||
|
type = with types; package;
|
||||||
|
default = pkgs.catppuccin-gtk.override {
|
||||||
|
accents = [ "pink" ];
|
||||||
|
size = "compact";
|
||||||
|
#tweaks = [ "rimless" "black" ];
|
||||||
|
variant = "frappe";
|
||||||
|
};
|
||||||
|
description = "catppuccin gtk theme package";
|
||||||
|
};
|
||||||
|
name = mkOption {
|
||||||
|
type = with types; str;
|
||||||
|
default = "Catppuccin-Frappe-Compact-Pink-Dark";
|
||||||
|
description = "name of catppuccin gtk theme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
package = mkOption {
|
||||||
|
type = with types; package;
|
||||||
|
default = pkgs.catppuccin-cursors.frappeDark;
|
||||||
|
description = "catppuccin cursor theme package";
|
||||||
|
};
|
||||||
|
name = mkOption {
|
||||||
|
type = with types; str;
|
||||||
|
default = "Catppuccin-Frappe-Dark-Cursors";
|
||||||
|
description = "name of catppuccin cursor theme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
users.homeModules = [
|
||||||
|
# this module passes catppuccin configuration to home-manager
|
||||||
|
{ passthrough.catppuccin = cfg; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# gtk and cursor themes
|
||||||
|
environment.systemPackages = with cfg; mkIf cfg.enable [
|
||||||
|
gtk.package cursor.package
|
||||||
|
];
|
||||||
|
|
||||||
|
# override greetd theme
|
||||||
|
programs.regreet = mkIf cfg.enable {
|
||||||
|
settings = {
|
||||||
|
GTK = {
|
||||||
|
cursor_theme_name = cfg.cursor.name;
|
||||||
|
theme_name = cfg.gtk.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,29 +1,33 @@
|
||||||
{ pkgs
|
{ pkgs
|
||||||
, lib
|
, lib
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; mkIf config.passthrough.gui {
|
, ... }: with lib; {
|
||||||
# cursor theme
|
imports = [ ./catppuccin/home.nix ];
|
||||||
home.pointerCursor = {
|
|
||||||
package = mkDefault pkgs.bibata-cursors;
|
config = mkIf config.passthrough.gui {
|
||||||
name = mkDefault "Bibata-Modern-Classic";
|
# cursor theme
|
||||||
size = 24;
|
home.pointerCursor = {
|
||||||
|
package = mkDefault pkgs.bibata-cursors;
|
||||||
|
name = mkDefault "Bibata-Modern-Classic";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
# gtk theme
|
||||||
|
gtk.theme = {
|
||||||
|
package = mkDefault pkgs.whitesur-gtk-theme;
|
||||||
|
name = mkDefault "WhiteSur-Dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# gtk icons
|
||||||
|
gtk.iconTheme = {
|
||||||
|
package = mkDefault pkgs.papirus-icon-theme;
|
||||||
|
name = mkDefault "Papirus-Dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# unify qt theme
|
||||||
|
qt.platformTheme = mkDefault "gtk";
|
||||||
|
|
||||||
|
gtk.enable = mkDefault true;
|
||||||
|
qt.enable = mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# gtk theme
|
|
||||||
gtk.theme = {
|
|
||||||
package = mkDefault pkgs.whitesur-gtk-theme;
|
|
||||||
name = mkDefault "WhiteSur-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
# gtk icons
|
|
||||||
gtk.iconTheme = {
|
|
||||||
package = mkDefault pkgs.papirus-icon-theme;
|
|
||||||
name = mkDefault "Papirus-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
# unify qt theme
|
|
||||||
qt.platformTheme = mkDefault "gtk";
|
|
||||||
|
|
||||||
gtk.enable = mkDefault true;
|
|
||||||
qt.enable = mkDefault true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
, config
|
, config
|
||||||
, ... }: with lib; let
|
, ... }: with lib; let
|
||||||
gui = with config.global.gpu; enable && session;
|
gui = with config.global.gpu; enable && session;
|
||||||
|
catppuccin = config.home.catppuccin;
|
||||||
in {
|
in {
|
||||||
|
imports = [ ./catppuccin/nixos.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
users.homeModules = [
|
users.homeModules = [
|
||||||
# this module passes gui configuration to home-manager
|
# this module passes gui configuration to home-manager
|
||||||
|
@ -12,10 +15,13 @@ in {
|
||||||
users.adminGroups = mkIf gui [ "video" ];
|
users.adminGroups = mkIf gui [ "video" ];
|
||||||
|
|
||||||
# themes and icons
|
# themes and icons
|
||||||
environment.systemPackages = with pkgs; mkIf gui [
|
environment.systemPackages = with pkgs; mkIf gui ([
|
||||||
whitesur-gtk-theme whitesur-icon-theme
|
papirus-icon-theme
|
||||||
papirus-icon-theme bibata-cursors
|
] ++ optionals (!catppuccin.enable) [
|
||||||
];
|
whitesur-gtk-theme
|
||||||
|
whitesur-icon-theme
|
||||||
|
bibata-cursors
|
||||||
|
]);
|
||||||
|
|
||||||
fonts.enableDefaultPackages = mkIf gui true;
|
fonts.enableDefaultPackages = mkIf gui true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue