Feature: Add spotify module.
- librespot as systemd service for backend. - Spotify-qt for qt-based GUI. - ncspot for TUI.
This commit is contained in:
parent
918da7fe12
commit
d2828fa751
22
dotfiles/modules/programs/spotify.nix
Normal file
22
dotfiles/modules/programs/spotify.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user