helm/modules/audio/spotify.nix

25 lines
675 B
Nix
Raw Normal View History

2019-12-03 21:10:51 -08:00
{ config, lib, pkgs, ... }:
let unstable = import <nixpkgs-unstable> {};
in
{
environment.systemPackages = with pkgs; [
# services.spotifyd doesn't work so...
spotifyd
(writeScriptBin "spt" ''
#!${stdenv.shell}
if ! pgrep -x spotifyd >/dev/null; then
spotifyd --backend pulseaudio \
2019-12-08 23:56:13 -08:00
--cache_path "$HOME/.cache/spotifyd" \
2019-12-03 21:10:51 -08:00
--username accounts@v0.io \
--password $(pass www/spotify.com)
fi
${unstable.spotify-tui}/bin/spt
'')
# spotify-tui is fine for selecting and playing music, but incomplete. We
# occasionally still need the official client.
spotify
];
}