From 6adc85a80855e4c82f8da9eff7ebd77c6affe803 Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Wed, 8 Nov 2023 22:10:57 -0500 Subject: [PATCH] fix(spicetify): use old catppuccin theme --- home/spicetify.nix | 26 ++++++++++++++++++++------ modules/home-manager.nix | 1 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/home/spicetify.nix b/home/spicetify.nix index 656abb39..1132ad12 100644 --- a/home/spicetify.nix +++ b/home/spicetify.nix @@ -1,15 +1,29 @@ -{ pkgs, inputs, config, ... }: +{ config, pkgs, inputs, ... }: let spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; in { - # Needs to be imported here in home manager config, not in flake.nix - imports = [ inputs.spicetify-nix.homeManagerModules.spicetify ]; - programs.spicetify = { enable = true; - theme = spicePkgs.themes.catppuccin; - colorScheme = config.catppuccin.flavour; + # Use pre-refactor (pre-#48) catppuccin theme + # so that the accent can be declaratively defined + theme = spicePkgs.themes.catppuccin // + rec { + name = "catppuccin-${config.catppuccin.flavour}"; + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "spicetify"; + rev = "0b602142da4a436f7012c07137e846034aea82cb"; + hash = "sha256-dBJ0vLvCdzpZZNHrsY6V8JQ2t4RB2L5OF/MdHGmIk4Y="; + }; + requiredExtensions = [ + { + src = "${src}/js"; + filename = "${name}.js"; + } + ]; + }; + colorScheme = config.catppuccin.accent; enabledExtensions = with spicePkgs.extensions; [ keyboardShortcut shuffle diff --git a/modules/home-manager.nix b/modules/home-manager.nix index cb5f70cd..fbdc5d63 100644 --- a/modules/home-manager.nix +++ b/modules/home-manager.nix @@ -9,6 +9,7 @@ inputs.nix-index-database.hmModules.nix-index inputs.catppuccin.homeManagerModules.catppuccin inputs.ssbm-nix.homeManagerModule + inputs.spicetify-nix.homeManagerModules.spicetify ]; }; extraSpecialArgs = {