nixos/home/modules/playerctl.nix

29 lines
546 B
Nix
Raw Normal View History

2024-07-11 01:05:13 +00:00
{ lib, config, pkgs, ... }:
2024-07-10 06:49:17 +00:00
let
cfg = config.snowhawk.playerctl;
in
{
options.snowhawk.playerctl = {
enable = lib.mkEnableOption "playerctl";
};
config = lib.mkIf cfg.enable {
services.playerctld.enable = true;
2024-07-11 01:12:53 +00:00
xsession.enable = true;
2024-07-11 01:05:13 +00:00
home.packages = with pkgs; [
playerctl
];
2024-07-11 01:12:53 +00:00
services.sxhkd = {
enable = true;
2024-07-11 01:21:27 +00:00
keybindings = {
"XF86AudioPlay" = "playerctl play-pause";
"XF86AudioPrev" = "playerctl previous";
"XF86AudioNext" = "playerctl next";
};
2024-07-11 01:12:53 +00:00
};
2024-07-10 06:49:17 +00:00
};
}