#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 = [ | ||||
|         (import ./overlays/letter) | ||||
|         (import ./overlays/icosystem) | ||||
|         (import ./overlays/cmdtime) | ||||
|         (import ./overlays/icosystem) | ||||
|         (import ./overlays/letter) | ||||
|         (import ./overlays/spotify) | ||||
|       ]; | ||||
| 
 | ||||
|       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 | ||||
|           oh-my-zsh | ||||
|           qalculate-gtk         # Calculator | ||||
|           spotify-adblock | ||||
|           tea                   # Gitea CLI | ||||
|           unzip | ||||
|           vifm                  # File manager | ||||
|  | @ -78,6 +79,8 @@ in { | |||
|           statix | ||||
|           vim-plug | ||||
|         ]); | ||||
| 
 | ||||
|         file.".config/spotify-adblock/config.toml".source = "${pkgs.spotify-adblock}/config.toml"; | ||||
|       }; | ||||
| 
 | ||||
|       # GNOME ricing | ||||
|  | @ -107,7 +110,20 @@ in { | |||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       xdg.mimeApps = { | ||||
|       xdg = { | ||||
|         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 | ||||
|  | @ -133,4 +149,5 @@ in { | |||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue