Add back mopidy

This commit is contained in:
Alexander Bantyev 2021-07-27 18:12:19 +03:00
parent 9c5e9be7de
commit 644d517cac
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
4 changed files with 77 additions and 5 deletions

View File

@ -14,13 +14,9 @@ with deviceSpecific; {
persist.state.directories = [ "/var/lib/bluetooth" ]; persist.state.directories = [ "/var/lib/bluetooth" ];
systemd.services.systemd-udev-settle.enable = false; systemd.services.systemd-udev-settle.enable = false;
services.upower = { services.upower = { enable = true; };
enable = true;
};
services.logind.lidSwitchExternalPower = "ignore"; services.logind.lidSwitchExternalPower = "ignore";
@ -34,6 +30,32 @@ with deviceSpecific; {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
pulse.enable = true; pulse.enable = true;
config.pipewire-pulse = {
"context.modules" = [
{
"args" = { };
"flags" = [ "ifexists" "nofail" ];
"name" = "libpipewire-module-rtkit";
}
{ "name" = "libpipewire-module-protocol-native"; }
{ "name" = "libpipewire-module-client-node"; }
{ "name" = "libpipewire-module-adapter"; }
{ "name" = "libpipewire-module-metadata"; }
{
"args" = {
"server.address" = [ "unix =native" "tcp:4713" ];
"vm.overrides" = { "pulse.min.quantum" = "1024/48000"; };
};
"name" = "libpipewire-module-protocol-pulse";
}
];
"context.properties" = { };
"context.spa-libs" = {
"audio.convert.*" = "audioconvert/libspa-audioconvert";
"support.*" = "support/libspa-support";
};
"stream.properties" = { };
};
media-session.config.bluez-monitor = { media-session.config.bluez-monitor = {
properties = { properties = {
"bluez5.codecs" = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ]; "bluez5.codecs" = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ];

View File

@ -80,6 +80,28 @@ in {
nurpkgs = pkgs; nurpkgs = pkgs;
}).repos; }).repos;
mopidy-ytmusic = with pkgs;
python3Packages.buildPythonApplication rec {
pname = "mopidy-ytmusic";
version = "3.2";
src = fetchFromGitHub {
owner = "ozymandiasthegreat";
repo = "mopidy-ytmusic";
rev = "2a7d8ec7f7161e5ca81e999786ea7c1f4da9205f";
sha256 = "hDOP0AR9P0sQHeW7JmG+yZf/w5mZrIu4Nl4xCMjQaIQ=";
fetchSubmodules = true;
};
propagatedBuildInputs = [
mopidy
python3Packages.pytube
python3Packages.ytmusicapi
];
doCheck = false;
};
inherit (nur.balsoft.pkgs) termNote nix-patch; inherit (nur.balsoft.pkgs) termNote nix-patch;
lambda-launcher = inputs.lambda-launcher.defaultPackage.${system}; lambda-launcher = inputs.lambda-launcher.defaultPackage.${system};

View File

@ -0,0 +1,27 @@
{ pkgs, config, lib, ... }:
{
secrets.mopidy_ytmusic_auth = {
owner = "mopidy:mopidy";
services = [ "mopidy" ];
};
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [ mopidy-mpd mopidy-ytmusic ];
configuration = ''
[ytmusic]
enabled=true
auth_json=${config.secrets.mopidy_ytmusic_auth.decrypted}
[mpd]
hostname = 0.0.0.0
port = 6600
[audio]
output = pulsesink server=127.0.0.1
'';
};
systemd.services.mopidy = {
after = [ "network-online.target" ];
};
}

View File

@ -31,6 +31,7 @@
kde kde
light light
mako mako
mopidy
simple-osd-daemons simple-osd-daemons
sway sway
]; ];