From 57110ddd81d56824a47535555d0c7886f0ece779 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 22 Mar 2024 10:19:40 -0500 Subject: [PATCH] Implement overlay for catppuccin --- modules/home-manager/linux-desktop.nix | 20 +++++++++++--------- overlays/default.nix | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/modules/home-manager/linux-desktop.nix b/modules/home-manager/linux-desktop.nix index ca995c1..c6e352b 100644 --- a/modules/home-manager/linux-desktop.nix +++ b/modules/home-manager/linux-desktop.nix @@ -13,15 +13,17 @@ gtk = { enable = true; # Currently failing: https://github.com/NixOS/nixpkgs/issues/298043 - # theme = { - # name = "Catppuccin-Mocha-Compact-Sapphire-Dark"; - # package = pkgs.catppuccin-gtk.override { - # accents = ["sapphire"]; - # size = "compact"; - # tweaks = ["rimless"]; - # variant = "mocha"; - # }; - # }; + # Overlay from https://github.com/NixOS/nixpkgs/issues/298043#issuecomment-2015319496 + # Fix on master but not yet in unstable https://github.com/NixOS/nixpkgs/pull/297683 + theme = { + name = "Catppuccin-Mocha-Compact-Sapphire-Dark"; + package = pkgs.catppuccin-gtk.override { + accents = ["sapphire"]; + size = "compact"; + tweaks = ["rimless"]; + variant = "mocha"; + }; + }; }; home.pointerCursor = { diff --git a/overlays/default.nix b/overlays/default.nix index 985105d..8045b3a 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -14,6 +14,29 @@ # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays modifications = final: prev: { + pythonPackagesExtensions = + prev.pythonPackagesExtensions + ++ [ + ( + python-final: python-prev: { + catppuccin = python-prev.catppuccin.overridePythonAttrs (oldAttrs: rec { + version = "1.3.2"; + + src = prev.fetchFromGitHub { + owner = "catppuccin"; + repo = "python"; + rev = "refs/tags/v${version}"; + hash = "sha256-spPZdQ+x3isyeBXZ/J2QE6zNhyHRfyRQGiHreuXzzik="; + }; + + # can be removed next version + disabledTestPaths = [ + "tests/test_flavour.py" # would download a json to check correctness of flavours + ]; + }); + } + ) + ]; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will