#13 Merge spotify into main
This commit is contained in:
commit
9e692e6a41
3 changed files with 65 additions and 23 deletions
|
@ -42,9 +42,10 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
sharedOverlays = [
|
sharedOverlays = [
|
||||||
(import ./overlays/letter)
|
|
||||||
(import ./overlays/icosystem)
|
|
||||||
(import ./overlays/cmdtime)
|
(import ./overlays/cmdtime)
|
||||||
|
(import ./overlays/icosystem)
|
||||||
|
(import ./overlays/letter)
|
||||||
|
(import ./overlays/spotify)
|
||||||
];
|
];
|
||||||
|
|
||||||
hostDefaults = {
|
hostDefaults = {
|
||||||
|
|
24
nixos/overlays/spotify/default.nix
Normal file
24
nixos/overlays/spotify/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
final: prev: {
|
||||||
|
spotify-adblock = final.rustPlatform.buildRustPackage rec {
|
||||||
|
name = "spotify-adblock";
|
||||||
|
version = "v1.0.3";
|
||||||
|
src = final.fetchFromGitHub {
|
||||||
|
owner = "abba23";
|
||||||
|
repo = "spotify-adblock";
|
||||||
|
rev = "5a3281d";
|
||||||
|
sha256 = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoHash = "sha256-oHfk68mAIcmOenW7jn71Xpt8hWVDtxyInWhVN2rH+kk=";
|
||||||
|
|
||||||
|
buildInputs = with final; [
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp $src/config.toml $out/config.toml
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -62,6 +62,7 @@ in {
|
||||||
nsxiv # Lightweight image viewer
|
nsxiv # Lightweight image viewer
|
||||||
oh-my-zsh
|
oh-my-zsh
|
||||||
qalculate-gtk # Calculator
|
qalculate-gtk # Calculator
|
||||||
|
spotify-adblock
|
||||||
tea # Gitea CLI
|
tea # Gitea CLI
|
||||||
unzip
|
unzip
|
||||||
vifm # File manager
|
vifm # File manager
|
||||||
|
@ -78,6 +79,8 @@ in {
|
||||||
statix
|
statix
|
||||||
vim-plug
|
vim-plug
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
file.".config/spotify-adblock/config.toml".source = "${pkgs.spotify-adblock}/config.toml";
|
||||||
};
|
};
|
||||||
|
|
||||||
# GNOME ricing
|
# GNOME ricing
|
||||||
|
@ -107,28 +110,42 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg = {
|
||||||
enable = true;
|
desktopEntries.spotify = {
|
||||||
|
name = "Spotify";
|
||||||
|
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 = {
|
||||||
|
TryExec = "spotify";
|
||||||
|
StartupWMClass = "spotify";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
defaultApplications = let
|
defaultApplications = let
|
||||||
browser = "firefox.desktop";
|
browser = "firefox.desktop";
|
||||||
image-viewer = "nsxiv.desktop";
|
image-viewer = "nsxiv.desktop";
|
||||||
pdf-viewer = "org.pwmt.zathura-pdf-mupdf.desktop";
|
pdf-viewer = "org.pwmt.zathura-pdf-mupdf.desktop";
|
||||||
in {
|
in {
|
||||||
"application/pdf" = pdf-viewer;
|
"application/pdf" = pdf-viewer;
|
||||||
"application/x-extension-htm" = browser;
|
"application/x-extension-htm" = browser;
|
||||||
"application/x-extension-html" = browser;
|
"application/x-extension-html" = browser;
|
||||||
"application/x-extension-shtml" = browser;
|
"application/x-extension-shtml" = browser;
|
||||||
"application/x-extension-xht" = browser;
|
"application/x-extension-xht" = browser;
|
||||||
"application/x-extension-xhtml" = browser;
|
"application/x-extension-xhtml" = browser;
|
||||||
"application/xhtml+xml" = browser;
|
"application/xhtml+xml" = browser;
|
||||||
"image/jpeg" = image-viewer;
|
"image/jpeg" = image-viewer;
|
||||||
"image/png" = image-viewer;
|
"image/png" = image-viewer;
|
||||||
"image/webp" = image-viewer;
|
"image/webp" = image-viewer;
|
||||||
"text/html" = browser;
|
"text/html" = browser;
|
||||||
"x-scheme-handler/chrome" = browser;
|
"x-scheme-handler/chrome" = browser;
|
||||||
"x-scheme-handler/http" = browser;
|
"x-scheme-handler/http" = browser;
|
||||||
"x-scheme-handler/https" = browser;
|
"x-scheme-handler/https" = browser;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue