Fix mopidy setup

Some of this can probably be pared down, but it's _working_.
This commit is contained in:
Trevor Vallender 2023-07-07 19:54:06 +01:00
parent 21b9cfbfc5
commit dfea6f986a
6 changed files with 40 additions and 13 deletions

View File

@ -5,6 +5,7 @@
imports = imports =
[ [
../shared/shared-configuration.nix ../shared/shared-configuration.nix
../shared/services/mopidy.nix
./eno-hardware.nix ./eno-hardware.nix
]; ];

View File

@ -7,7 +7,6 @@
../shared/shared-configuration.nix ../shared/shared-configuration.nix
./kernighan-hardware.nix ./kernighan-hardware.nix
./services/nginx.nix ./services/nginx.nix
./services/mopidy.nix
]; ];
networking = { networking = {

View File

@ -1,12 +0,0 @@
{ config, pkgs, inputs, ... }:
{
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [
mopidy-spotify
mopidy-mpd
];
}

View File

@ -18,6 +18,7 @@ in
../shared/desktop.nix ../shared/desktop.nix
./ritchie-hardware.nix ./ritchie-hardware.nix
../shared/filesystem.nix ../shared/filesystem.nix
../shared/services/mopidy.nix
]; ];
networking = { networking = {

View File

@ -35,10 +35,16 @@
pkgs.git pkgs.git
pkgs.pciutils pkgs.pciutils
pkgs.pinentry-curses pkgs.pinentry-curses
pkgs.pulseaudio
pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-kde pkgs.xdg-desktop-portal-kde
inputs.devenv.packages.x86_64-linux.devenv inputs.devenv.packages.x86_64-linux.devenv
pkgs.gst_all_1.gstreamer
pkgs.gst_all_1.gst-plugins-base
pkgs.gst_all_1.gst-plugins-good
pkgs.gst_all_1.gst-plugins-bad
pkgs.gst_all_1.gst-plugins-ugly
]; ];
xdg.mime.enable = true; xdg.mime.enable = true;

View File

@ -0,0 +1,32 @@
{ config, pkgs, inputs, ... }:
{
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [
mopidy-spotify
mopidy-mpd
mopidy-local
mopidy-tunein
mopidy-notify
mopidy-bandcamp
mopidy-iris
];
configuration = ''
[audio]
mixer = software
output = pulsesink server=127.0.0.1
[spotify]
username = m5rbjtehisns9eq601d2hzw62
password =
client_id = a33a989f-bc04-43ea-a043-56232745d702
client_secret =
'';
};
hardware.pulseaudio.extraConfig = "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1";
}