nixos/home/modules/playerctl.nix

27 lines
497 B
Nix
Raw Normal View History

{ lib, config, pkgs, ... }:
let
cfg = config.snowhawk.playerctl;
in
{
options.snowhawk.playerctl = {
enable = lib.mkEnableOption "playerctl";
};
config = lib.mkIf cfg.enable {
services.playerctld.enable = true;
home.packages = with pkgs; [
playerctl
];
services.sxhkd = {
keybindings = {
"XF86AudioPlay" = "playerctl play-pause";
"XF86AudioPrev" = "playerctl previous";
"XF86AudioNext" = "playerctl next";
};
};
};
}