spotifyd with spotify-tui

This commit is contained in:
Dmitriy Holkin 2020-02-08 03:53:35 +04:00
parent 7b03b70bb9
commit 1714497695
6 changed files with 34 additions and 3 deletions

View File

@ -91,6 +91,7 @@ in {
xarchiver
tdesktop
spotifywm
spotify-tui
discord
pulseeffects
] ++ lib.optionals (!isVM) [

View File

@ -31,6 +31,7 @@ device:
./workspace/misc.nix
./workspace/mpv.nix
./workspace/rofi.nix
./workspace/spotifyd.nix
./workspace/xresources.nix
./workspace/zsh.nix
];

View File

@ -14,13 +14,17 @@ in { pkgs, config, lib, ... }: {
i3lock-fancy-rapid = pkgs.callPackage ./applications/i3lock-fancy-rapid.nix { };
git-with-libsecret = super.git.override { withLibsecret = true; };
xonar-fp = pkgs.callPackage ./applications/xonar-fp.nix { };
git-with-libsecret = super.git.override { withLibsecret = true; };
}
)
];
nixpkgs.config.packageOverrides = pkgs: {
spotifyd = pkgs.spotifyd.override { withPulseAudio = true; };
};
nixpkgs.pkgs = import imports.nixpkgs {
config.allowUnfree = true;
} // config.nixpkgs.config;

View File

@ -26,6 +26,7 @@ in rec {
};
windows-samba = mkCredOption "samba on windows" { };
linux-samba = mkCredOption "samba on linux" { };
spotify = mkCredOption "Spotify" { };
};
config = let
secretnix = import ../secret.nix;

View File

@ -94,7 +94,7 @@ in {
startup = map (a: { notification = false; } // a) [
{ command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; }
{ command = "${pkgs.pywal}/bin/wal -R"; }
{ command = "${pkgs.spotifywm}/bin/spotifywm"; }
# { command = "${pkgs.spotifywm}/bin/spotifywm"; }
{
command =
"${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";

View File

@ -0,0 +1,24 @@
{ pkgs, config, lib, ... }:
let
spotifydConf = pkgs.writeText "spotifyd.conf" ''
[global]
username = ${config.secrets.spotify.user}
password = ${config.secrets.spotify.password}
use_keyring = false
bitrate = 320
volume_normalisation = false
backend = pulseaudio
'';
in {
#TODO: отвязать от папки пользователя
systemd.user.services.spotifyd = {
wantedBy = [ "default.target" ];
after = [ "network-online.target" "sound.target" ];
description = "spotifyd, a Spotify playing daemon";
serviceConfig = {
ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --cache-path /home/alukard/.cache/spotifyd --config-path ${spotifydConf}";
Restart = "always";
RestartSec = 12;
};
};
}