diff --git a/system/eno/eno.nix b/system/eno/eno.nix index 4239105..e6e975b 100644 --- a/system/eno/eno.nix +++ b/system/eno/eno.nix @@ -5,6 +5,7 @@ imports = [ ../shared/shared-configuration.nix + ../shared/services/mopidy.nix ./eno-hardware.nix ]; diff --git a/system/kernighan/kernighan.nix b/system/kernighan/kernighan.nix index 5d1ee3d..45662b9 100644 --- a/system/kernighan/kernighan.nix +++ b/system/kernighan/kernighan.nix @@ -7,7 +7,6 @@ ../shared/shared-configuration.nix ./kernighan-hardware.nix ./services/nginx.nix - ./services/mopidy.nix ]; networking = { diff --git a/system/kernighan/services/mopidy.nix b/system/kernighan/services/mopidy.nix deleted file mode 100644 index cadf0a1..0000000 --- a/system/kernighan/services/mopidy.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, inputs, ... }: - -{ - services.mopidy = { - enable = true; - - extensionPackages = with pkgs; [ - mopidy-spotify - mopidy-mpd - ]; -} - diff --git a/system/ritchie/ritchie.nix b/system/ritchie/ritchie.nix index 02403ee..fbeec29 100644 --- a/system/ritchie/ritchie.nix +++ b/system/ritchie/ritchie.nix @@ -18,6 +18,7 @@ in ../shared/desktop.nix ./ritchie-hardware.nix ../shared/filesystem.nix + ../shared/services/mopidy.nix ]; networking = { diff --git a/system/shared/desktop-configuration.nix b/system/shared/desktop-configuration.nix index 18f9da9..7cc1762 100644 --- a/system/shared/desktop-configuration.nix +++ b/system/shared/desktop-configuration.nix @@ -35,10 +35,16 @@ pkgs.git pkgs.pciutils pkgs.pinentry-curses + pkgs.pulseaudio pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-kde 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; diff --git a/system/shared/services/mopidy.nix b/system/shared/services/mopidy.nix new file mode 100644 index 0000000..4845a2b --- /dev/null +++ b/system/shared/services/mopidy.nix @@ -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"; +} +