nix/modules/wm/mpv/default.nix

32 lines
618 B
Nix
Raw Permalink Normal View History

2024-11-24 21:35:15 +01:00
{
lib,
config,
username,
pkgs,
...
}: {
options = {
mpv.enable = lib.mkEnableOption "";
};
config = lib.mkIf config.mpv.enable {
home-manager.users.${username} = {
programs.mpv = {
enable = true;
bindings = {
x = "add speed 0.1";
z = "add speed -0.1";
"," = "frame-back-step";
"." = "frame-step";
space = "cycle-values speed 1 2";
DOWN = "add volume -5";
UP = "add volume 5";
};
scripts = with pkgs.mpvScripts; [
mpris
sponsorblock
];
};
};
};
}