user/spicetify: bring back with updates

This commit is contained in:
LavaDesu 2025-03-17 01:33:41 +11:00
parent 017e2bc812
commit b9df2f3a0c
Signed by: cilly
GPG key ID: 6500251E087653C9
4 changed files with 67 additions and 19 deletions

View file

@ -1,34 +1,41 @@
{ config, inputs, pkgs, ... }:
let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
#adblock = inputs.spotify-adblock.defaultPackage.x86_64-linux;
adblock = pkgs.me.spotify-adblock;
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in
{
imports = [ inputs.spicetify-nix.homeManagerModule ];
imports = [ inputs.spicetify-nix.homeManagerModules.spicetify ];
programs.spicetify = {
spotifyPackage = pkgs.spotify-unwrapped.overrideAttrs(o: {
installPhase = pkgs.lib.replaceStrings ["--prefix PATH"] [
''--prefix SPOTIFY_ADBLOCK_CONFIG : ${adblock}/lib/config.toml \
--prefix LD_PRELOAD : ${adblock}/lib/libspotifyadblock.so \
--prefix PATH''] o.installPhase;
});
enable = true;
theme = spicePkgs.themes.Dribbblish // {
#src = inputs.spicetify-themes;
extraCommands = "spicetify-cli --no-restart config experimental_features 1";
#requiredExtensions = [((builtins.head spicePkgs.themes.Dribbblish.requiredExtensions) // { filename = "theme.js"; }) ];
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;
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}" \
"sidebar = ${color_sidebar_next}"
'';
};
};
colorScheme = "purple";
colorScheme = "catppuccin-${config.catppuccin.flavor}";
enabledCustomApps = with spicePkgs.apps; [
lyrics-plus
lyricsPlus
];
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplayMod
shuffle # shuffle+ (special characters are sanitized out of ext names)
fullAppDisplay
shuffle
hidePodcasts
skipStats