sisyphus/nixos/modules/apps/spotify/default.nix

30 lines
797 B
Nix
Raw Normal View History

2023-10-08 22:13:53 +02:00
{ config, lib, pkgs, ... }:
{
home-manager.users.tdpeuter = {
home = {
packages = with pkgs; [
spotify
spotify-adblock
];
file.".config/spotify-adblock/config.toml".source = "${pkgs.spotify-adblock}/config.toml";
};
2023-10-08 22:13:53 +02:00
# Set the desktop entry to use adblock.
# TODO Is it possible to inherit all other values?
xdg.desktopEntries.spotify = {
name = "Spotify";
2023-10-08 23:04:55 +02:00
genericName = "Music Player";
icon = "spotify-client";
exec = "env LD_PRELOAD=${pkgs.spotify-adblock}/lib/libspotifyadblock.so spotify %U";
mimeType = [ "x-scheme-handler/spotify" ];
categories = [ "Audio" "Music" "Player" "AudioVideo" ];
settings = {
2023-10-12 17:26:29 +02:00
TryExec = "spotify";
2023-10-08 23:04:55 +02:00
StartupWMClass = "spotify";
};
2023-10-08 22:13:53 +02:00
};
};
}