Package polybar-spotify

This commit is contained in:
Agatha Lovelace 2023-07-07 16:02:03 +02:00
parent b366ed8df4
commit 164e7eb377
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,19 @@
{ pkgs }:
pkgs.stdenv.mkDerivation rec {
pname = "polybar-spotify";
version = "5edc2e598cf0ec5c54860c28db870af998271666";
src = pkgs.fetchFromGitHub {
owner = "Jvanrhijn";
repo = pname;
rev = version;
sha256 = "sha256-JPoigtxBYnFqi+8erhTcJlGN53VtS6z9mqNajQM0Xsk=";
};
propagatedBuildInputs = [
(pkgs.python39.withPackages (pyPkgs: [ pyPkgs.dbus-python ]))
pkgs.playerctl
];
installPhase = "install -Dm755 ./spotify_status.py $out/bin/polybar-spotify";
}

View File

@ -10,6 +10,8 @@
(final: prev: { (final: prev: {
pads = final.callPackage ../../common/pkgs/pads.nix { }; pads = final.callPackage ../../common/pkgs/pads.nix { };
bspm = final.callPackage ../../common/pkgs/bspm.nix { }; bspm = final.callPackage ../../common/pkgs/bspm.nix { };
polybar-spotify =
final.callPackage ../../common/pkgs/polybar-spotify.nix { };
}) })
]; ];
@ -51,6 +53,9 @@
settings = { General = { Disable = "Headset"; }; }; settings = { General = { Disable = "Headset"; }; };
}; };
# Don't suspend when closed and plugged into power
services.logind.lidSwitchExternalPower = "ignore";
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave