diff --git a/colors/default.nix b/colors/default.nix index d0c660a..2c93fe5 100644 --- a/colors/default.nix +++ b/colors/default.nix @@ -1,4 +1,4 @@ { undefined = "#ff00ff"; foreground-bright = "#ffffff"; -} // import ./everforest.nix +} // import ./everforest diff --git a/colors/everforest.nix b/colors/everforest/default.nix similarity index 68% rename from colors/everforest.nix rename to colors/everforest/default.nix index d4e749c..c1de0fe 100644 --- a/colors/everforest.nix +++ b/colors/everforest/default.nix @@ -1,5 +1,9 @@ { kitty-theme = "Everforest Dark Hard"; + gtkTheme = pkgs: { + package = pkgs.callPackage ./gtk.nix {}; + name = "Everforest-Dark-BL"; + }; wallpaper = "306286.jpg"; background = "#1e2326"; diff --git a/colors/everforest/gtk.nix b/colors/everforest/gtk.nix new file mode 100644 index 0000000..b184576 --- /dev/null +++ b/colors/everforest/gtk.nix @@ -0,0 +1,43 @@ +{ lib +, stdenv +, fetchFromGitHub +, gtk-engine-murrine +, jdupes +}: + +stdenv.mkDerivation rec { + pname = "everforest-gtk"; + version = "unstable-2022-12-09"; + + src = fetchFromGitHub { + owner = "Fausto-Korpsvart"; + repo = "Everforest-GTK-Theme"; + rev = "af5920c8a16a53064cbcb7582bd7ef0ba8f44d83"; + sha256 = "lIAJN8ljmN4RyvyPpHoAheyQBX/qyGXZsGvoTl1vt50="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ jdupes ]; + + propagatedUserEnvPkgs = [ gtk-engine-murrine ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/themes + + cp -a source/themes/* $out/share/themes + + jdupes -L -r $out/share + + runHook postInstall + ''; + + meta = with lib; { + description = "Everforest colour palette for GTK"; + homepage = "https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme"; + license = licenses.gpl3Only; + platforms = platforms.all; + }; +} diff --git a/colors/nord.nix b/colors/nord/default.nix similarity index 73% rename from colors/nord.nix rename to colors/nord/default.nix index 0a4d02a..84d811a 100644 --- a/colors/nord.nix +++ b/colors/nord/default.nix @@ -1,6 +1,10 @@ { kitty-theme = "Nord"; wallpaper = "roxynord.png"; + gtkTheme = pkgs: { + package = pkgs.nordic; + name = "Nordic"; + }; background = "#2e3440"; background-alt = "#3b4252"; diff --git a/hosts/desktop.nix b/hosts/desktop.nix index 77b41fe..856556c 100644 --- a/hosts/desktop.nix +++ b/hosts/desktop.nix @@ -13,10 +13,7 @@ in enable = true; greeters.gtk = { enable = true; - theme = { - name = "Nordic"; - package = pkgs.nordic; - }; + theme = colors.gtkTheme pkgs; }; background = ../wallpapers/${colors.wallpaper}; }; diff --git a/hosts/home.nix b/hosts/home.nix index f14c701..841b5b5 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -1,8 +1,6 @@ { config, pkgs, user, ... }: let - theme = pkgs.nordic; - themeName = "Nordic"; colors = import ../colors; in { @@ -21,17 +19,11 @@ in home.file."./.background-image".source = ../wallpapers/${colors.wallpaper}; programs.home-manager.enable = true; - + gtk = { enable = true; - iconTheme = { - name = "${themeName}"; - package = "${theme}"; - }; - theme = { - name = "${themeName}"; - package = "${theme}"; - }; + iconTheme = colors.gtkTheme pkgs; + theme = colors.gtkTheme pkgs; # Remove minimize, maximize, and close buttons gtk3.extraConfig = { gtk-decoration-layout = "appmenu:none"; @@ -64,6 +56,7 @@ in # Tray applications networkmanagerapplet # nm-applet nextcloud-client + #(pkgs.callPackage ../colors/everforest/gtk.nix {}) # GUI applications firefox