mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 04:23:18 +00:00
2c0e3f61da
Closes issue #1725. This allows mpv module to be customized with support for more advanced features than the `programs.mpv.scripts` current support. For example, with this change now this is possible: ```nix { programs.mpv.package = (pkgs.wrapMpv (pkgs.mpv-unwrapped.override { vapoursynthSupport = true; }) { extraMakeWrapperArgs = [ "--prefix" "LD_LIBRARY_PATH" ":" "${pkgs.vapoursynth-mvtools}/lib/vapoursynth" ]; }); } ``` Since `programs.mpv.package` doesn't necessary reflect the final derivation anymore (see #1524), we introduce `programs.mpv.finalPackage` that has the resulting derivation. This includes 2 tests: - One to check if everything is alright with mpv - Other to validate our assertion that package and scripts can't be passed both at the same time * docs: document recent mpv module changes * mpv: add thiagokokada as maintainer
46 lines
1,006 B
Nix
46 lines
1,006 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
config = {
|
|
programs.mpv = {
|
|
enable = true;
|
|
package = pkgs.mpvDummy;
|
|
|
|
bindings = {
|
|
WHEEL_UP = "seek 10";
|
|
WHEEL_DOWN = "seek -10";
|
|
"Alt+0" = "set window-scale 0.5";
|
|
};
|
|
|
|
config = {
|
|
force-window = true;
|
|
ytdl-format = "bestvideo+bestaudio";
|
|
cache-default = 4000000;
|
|
};
|
|
|
|
profiles = {
|
|
fast = { vo = "vdpau"; };
|
|
"protocol.dvd" = {
|
|
profile-desc = "profile for dvd:// streams";
|
|
alang = "en";
|
|
};
|
|
};
|
|
|
|
defaultProfiles = [ "gpu-hq" ];
|
|
};
|
|
|
|
nixpkgs.overlays = [
|
|
(self: super: { mpvDummy = pkgs.runCommandLocal "mpv" { } "mkdir $out"; })
|
|
];
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/mpv/mpv.conf \
|
|
${./mpv-example-settings-expected-config}
|
|
assertFileContent \
|
|
home-files/.config/mpv/input.conf \
|
|
${./mpv-example-settings-expected-bindings}
|
|
'';
|
|
};
|
|
|
|
}
|