Files
nix/hosts/common/user/configs/gui/spicetify/default.nix
2024-08-08 22:03:15 +03:00

64 lines
1.4 KiB
Nix

{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
inputs,
pkgs,
...
}:
{
networking.firewall = {
allowedTCPPorts = [ 57621 ];
allowedUDPPorts = [ 5353 ];
};
environment.persistence = {
"/persist"."${home}/.config/spotify" = { };
"/cache"."${home}/.cache/spotify" = { };
};
home-manager.users.${user} = {
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
programs.spicetify =
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in
{
enable = true;
spicetifyPackage = pkgs.spicetify-cli.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [ ./user-colors.patch ];
});
theme = spicePkgs.themes.sleek // {
extraCommands = ''
export COLORS_CSS_PATH="${home}/.config/spotify/colors.css"
'';
additionalCss = ''
.main-topBar-topbarContentRight button {
background-color: unset !important;
}
'';
};
enabledExtensions = with spicePkgs.extensions; [
loopyLoop
trashbin
fullAlbumDate
phraseToPlaylist
songStats
copyToClipboard
betterGenres
adblock
autoSkip
];
};
theme.templates."${home}/.config/spotify/colors.css".source = ./colors.css;
};
}