Joey Hafner d2828fa751
Feature: Add spotify module.
- librespot as systemd service for backend.
  - Spotify-qt for qt-based GUI.
  - ncspot for TUI.
2025-01-30 14:45:58 -08:00

22 lines
731 B
Nix

{ 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";
};
};
};
}