flakes/modules/user/spicetify.nix

53 lines
2 KiB
Nix
Raw Normal View History

2023-01-23 22:18:27 +07:00
{ config, inputs, pkgs, ... }:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
2023-01-23 22:18:27 +07:00
in
{
imports = [ inputs.spicetify-nix.homeManagerModules.spicetify ];
2023-01-23 22:18:27 +07:00
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.dribbblish // rec {
src = pkgs.stdenvNoCC.mkDerivation {
pname = "spicetify-dribbblish-catppuccin-patch";
version = "1.0.0";
dontUnpack = true;
installPhase = let
color_prev1 = builtins.replaceStrings ["#"] [""] config.catppuccin.hexcolors.overlay1;
color_prev2 = builtins.replaceStrings ["#"] [""] config.catppuccin.hexcolors.overlay2;
color_next = builtins.replaceStrings ["#"] [""] config.catppuccin.hexcolors.${config.catppuccin.accent};
color_sidebar_prev = builtins.replaceStrings ["#"] [""] config.catppuccin.hexcolors.mantle;
color_sidebar_next = builtins.replaceStrings ["#"] [""] config.catppuccin.hexcolors.crust;
2025-03-17 13:09:03 +11:00
color_sidebar_text_prev = builtins.replaceStrings ["#"] [""] config.catppuccin.hexcolors.text;
color_sidebar_text_next = builtins.replaceStrings ["#"] [""] (config.catppuccin.hexcolors.base);
in ''
cp -r ${spicePkgs.themes.dribbblish.src} $out
substituteInPlace $out/color.ini \
--replace-fail "${color_prev1}" "${color_next}" \
--replace-fail "${color_prev2}" "${color_next}" \
--replace-fail "sidebar = ${color_sidebar_prev}" \
2025-03-17 13:09:03 +11:00
"sidebar = ${color_sidebar_next}" \
--replace-fail "sidebar-text = ${color_sidebar_text_prev}" \
"sidebar-text = ${color_sidebar_text_next}"
'';
};
2023-06-19 21:59:07 +07:00
};
colorScheme = "catppuccin-${config.catppuccin.flavor}";
2023-01-23 22:18:27 +07:00
2023-04-06 20:10:41 +07:00
enabledCustomApps = with spicePkgs.apps; [
lyricsPlus
2023-04-06 20:10:41 +07:00
];
2023-01-23 22:18:27 +07:00
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
shuffle
2023-01-23 22:18:27 +07:00
hidePodcasts
2023-04-06 20:10:41 +07:00
skipStats
songStats
history
volumePercentage
2023-01-23 22:18:27 +07:00
];
};
}