diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix index 2ce63b9..3b02d22 100644 --- a/modules/greetd/default.nix +++ b/modules/greetd/default.nix @@ -36,6 +36,30 @@ let inputStr = moduleStr "input"; outputStr = moduleStr "output"; + + gtkTheme = { + name = "Colloid-Dark-Compact-Catppuccin"; + package = pkgs.colloid-gtk-theme.override { + colorVariants = [ "dark" ]; + sizeVariants = [ "compact" ]; + tweaks = [ + "catppuccin" + "rimless" + ]; + }; + }; + + iconTheme = { + name = "Colloid-Catppuccin-Dark"; + package = pkgs.colloid-icon-theme.override { + schemeVariants = [ "catppuccin" ]; + }; + }; + + cursorTheme = { + name = "Catppuccin-Mocha-Dark-Cursors"; + package = pkgs.catppuccin-cursors.mochaDark; + }; in { options.eboskma.greetd = { @@ -78,27 +102,10 @@ in ]; environment = { - systemPackages = with pkgs; [ - (colloid-gtk-theme.override { - colorVariants = [ "dark" ]; - sizeVariants = [ "compact" ]; - tweaks = [ - "catppuccin" - "rimless" - ]; - }) - (orchis-theme.override { - tweaks = [ - "compact" - "macos" - ]; - border-radius = 5; - }) - catppuccin-cursors.mochaDark - pantheon.elementary-icon-theme - (colloid-icon-theme.override { - schemeVariants = [ "catppuccin" ]; - }) + systemPackages = [ + gtkTheme.package + iconTheme.package + cursorTheme.package ]; etc = { "greetd/sway-config" = { @@ -140,9 +147,9 @@ in "xdg/gtk-3.0/settings.ini" = { text = generators.toINI { } { Settings = { - gtk-theme-name = "Colloid-Dark-Compact-Catppuccin"; - gtk-icon-theme-name = "Colloid-Catppuccin-Dark"; - gtk-cursor-theme-name = "Catppuccin-Mocha-Dark-Cursors"; + gtk-theme-name = gtkTheme.name; + gtk-icon-theme-name = iconTheme.name; + gtk-cursor-theme-name = cursorTheme.name; gtk-application-prefer-dark-theme = "true"; }; }; @@ -150,19 +157,17 @@ in "xdg/gtk-4.0/settings.ini" = { text = generators.toINI { } { Settings = { - gtk-theme-name = "Colloid-Dark-Compact-Catppuccin"; - gtk-icon-theme-name = "Colloid-Catppuccin-Dark"; - gtk-cursor-theme-name = "Catppuccin-Mocha-Dark-Cursors"; + gtk-theme-name = gtkTheme.name; + gtk-icon-theme-name = iconTheme.name; + gtk-cursor-theme-name = cursorTheme.name; gtk-application-prefer-dark-theme = "true"; }; }; - "xdg/gtk-4.0/assets".source = - "${homeCfg.gtk.theme.package}/share/themes/${homeCfg.gtk.theme.name}/gtk-4.0/assets"; - "xdg/gtk-4.0/gtk.css".source = - "${homeCfg.gtk.theme.package}/share/themes/${homeCfg.gtk.theme.name}/gtk-4.0/gtk.css"; - "xdg/gtk-4.0/gtk-dark.css".source = - "${homeCfg.gtk.theme.package}/share/themes/${homeCfg.gtk.theme.name}/gtk-4.0/gtk-dark.css"; }; + "xdg/gtk-4.0/assets".source = "${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/assets"; + "xdg/gtk-4.0/gtk.css".source = "${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/gtk.css"; + "xdg/gtk-4.0/gtk-dark.css".source = + "${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/gtk-dark.css"; }; }; };