Use latest versions of somafm and soundcloud

This commit is contained in:
coolneng 2022-09-04 08:06:02 +02:00
parent 14be05d141
commit f367cce4b3
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
3 changed files with 33 additions and 5 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
secrets/soundcloud_token filter=git-crypt diff=git-crypt

View File

@ -2,12 +2,32 @@
with pkgs; with pkgs;
# HACK Replace youtube-dl with yt-dlp in mopidy-youtube
let let
# HACK Replace youtube-dl with yt-dlp in mopidy-youtube
mopidy-youtube-yt_dlp = mopidy-youtube.overrideAttrs (old: rec { mopidy-youtube-yt_dlp = mopidy-youtube.overrideAttrs (old: rec {
propagatedBuildInputs = old.propagatedBuildInputs propagatedBuildInputs = old.propagatedBuildInputs
++ [ python3.pkgs.yt-dlp ]; ++ [ python3.pkgs.yt-dlp ];
}); });
latest-mopidy-somafm = mopidy-somafm.overrideAttrs (old: rec {
src = python3Packages.fetchPypi {
version = "2.0.2";
pname = "Mopidy-SomaFM";
sha256 = "DC0emxkoWfjGHih2C8nINBFByf521Xf+3Ks4JRxNPLM=";
};
});
soundcloud_token = builtins.readFile ../secrets/soundcloud_token;
latest-mopidy-soundcloud = mopidy-soundcloud.overrideAttrs (old: rec {
src = fetchFromGitHub {
owner = "mopidy";
repo = "mopidy-soundcloud";
rev = "fc766b0bf17feb4fc989029b92a315a10ff453ee";
sha256 = "sha256-LftBbfs5KqqkhFQVZRh/AQKQQ+18x8RapRU1mTB7FD8=";
};
propagatedBuildInputs = old.propagatedBuildInputs
++ [ python3.pkgs.beautifulsoup4 ];
});
in { in {
# Configure pipewire as sound server # Configure pipewire as sound server
services.pipewire = { services.pipewire = {
@ -32,13 +52,16 @@ in {
# Set up Mopidy # Set up Mopidy
services.mopidy = { services.mopidy = {
enable = true; enable = true;
extensionPackages = extensionPackages = [
[ mopidy-mpd mopidy-youtube-yt_dlp mopidy-somafm mopidy-local ]; mopidy-mpd
mopidy-local
mopidy-youtube-yt_dlp
latest-mopidy-somafm
latest-mopidy-soundcloud
];
configuration = '' configuration = ''
[audio] [audio]
mixer_volume =
output = pulsesink server=127.0.0.1 output = pulsesink server=127.0.0.1
visualizer =
[local] [local]
media_dir = /home/coolneng/Music media_dir = /home/coolneng/Music
@ -72,6 +95,10 @@ in {
[somafm] [somafm]
encoding = aac encoding = aac
quality = highest quality = highest
[soundcloud]
auth_token = ${soundcloud_token}
explore_songs = 100
''; '';
}; };
} }

BIN
secrets/soundcloud_token Normal file

Binary file not shown.