# modules/home/spotify.nix — Spotify, patched with Spicetify. # # spicetify-nix (inputs.spicetify-nix) builds a patched Spotify and installs it; # there is no separate pkgs.spotify in home.packages. The `spicetify` CLI is not # used: everything it would write to ~/.config/spicetify is declared here and # baked in at build time, so changes land with `nh os switch`. # # Theme: Sleek with a custom colour scheme taken from _palette.nix, so it # follows theme.nix (rose-pine / gruvpine / gruvbox) like the rest of the desktop. # # Wayland-native by default (the module passes the Ozone flags). Spotify is # unfree; the host already sets nixpkgs.config.allowUnfree. { ... }: let theme = import ../_palette.nix; in { flake.homeModules.spotify = { pkgs, inputs, ... }: let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; hex = c: builtins.substring 1 6 c; # spicetify wants colours without the '#' p = theme.palette; in { imports = [ inputs.spicetify-nix.homeManagerModules.spicetify ]; programs.spicetify = { enable = true; theme = spicePkgs.themes.sleek; customColorScheme = builtins.mapAttrs (_: hex) { text = p.text; subtext = p.subtle; nav-active-text = p.base; main = p.base; sidebar = p.surface; player = p.surface; card = p.overlay; shadow = p.base; selected-row = p.hlHigh; button = p.pine; button-active = p.foam; button-disabled = p.muted; tab-active = p.hlMed; notification = p.overlay; notification-error = p.love; playback-bar = p.pine; misc = p.iris; }; enabledExtensions = with spicePkgs.extensions; [ adblockify # no audio/banner ads on the free tier hidePodcasts shuffle # true Fisher–Yates shuffle fullAppDisplay keyboardShortcut # vim-style navigation playlistIcons history trashbin # hide songs/artists you never want to hear again songStats # track audio features (key, tempo, energy …) popupLyrics # lyrics in a floating window copyToClipboard goToSong # jump back to the playing track in its playlist playNext # "play next" in context menus volumePercentage showQueueDuration ]; enabledCustomApps = with spicePkgs.apps; [ lyricsPlus newReleases historyInSidebar betterLibrary ncsVisualizer # audio visualiser page ]; # The Marketplace app is deliberately absent: it installs themes and # extensions at runtime, which this module would undo on the next switch. }; } ; }