Feature: Add spotify module.

- librespot as systemd service for backend.
  - Spotify-qt for qt-based GUI.
  - ncspot for TUI.
This commit is contained in:
Joey Hafner 2025-01-30 14:45:58 -08:00
parent 918da7fe12
commit d2828fa751
Signed by: Jafner
GPG Key ID: 6D9A24EF2F389E55

View File

@ -0,0 +1,22 @@
{ pkgs, sys, ... }: {
networking.firewall.allowedTCPPorts = [ 57621 ];
networking.firewall.allowedUDPPorts = [ 5353 ];
home-manager.users.${sys.username} = {
home.packages = with pkgs; [
spotify-qt
ncspot
librespot
];
systemd.user.services.librespot = {
Unit = {
Description = "Librespot (an open source Spotify client)";
Documentation = [ "https://github.com/librespot-org/librespot" "https://github.com/librespot-org/librespot/wiki/Options" ];
};
Service = {
Restart = "always";
RestartSec = 10;
ExecStart = "${pkgs.librespot}/bin/librespot --backend pulseaudio --system-cache /home/${sys.username}/.spotify -j";
};
};
};
}