mpv: switch to wlshm vo backend on moby; default for desko
This commit is contained in:
parent
e7768572e5
commit
a225b7e5f5
|
@ -49,6 +49,7 @@
|
||||||
# sane.programs.ntfy-sh.config.autostart = true;
|
# sane.programs.ntfy-sh.config.autostart = true;
|
||||||
sane.programs.dino.config.autostart = true;
|
sane.programs.dino.config.autostart = true;
|
||||||
# sane.programs.calls.config.autostart = true;
|
# sane.programs.calls.config.autostart = true;
|
||||||
|
sane.programs.mpv.config.vo = "wlshm"; #< see hosts/common/programs/mpv.nix for details
|
||||||
|
|
||||||
sane.programs.firefox.mime.priority = 300; # prefer other browsers when possible
|
sane.programs.firefox.mime.priority = 300; # prefer other browsers when possible
|
||||||
# HACK/TODO: make `programs.P.env.VAR` behave according to `mime.priority`
|
# HACK/TODO: make `programs.P.env.VAR` behave according to `mime.priority`
|
||||||
|
@ -83,8 +84,6 @@
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# sane.programs.mpv.enableFor.user.colin = true;
|
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
# /boot space is at a premium. default was 20.
|
# /boot space is at a premium. default was 20.
|
||||||
# even 10 can be too much
|
# even 10 can be too much
|
||||||
|
|
|
@ -3,38 +3,54 @@
|
||||||
# - <https://github.com/mpv-player/mpv/wiki>
|
# - <https://github.com/mpv-player/mpv/wiki>
|
||||||
# curated mpv mods/scripts/users:
|
# curated mpv mods/scripts/users:
|
||||||
# - <https://github.com/stax76/awesome-mpv>
|
# - <https://github.com/stax76/awesome-mpv>
|
||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.sane.programs.mpv;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
sane.programs.mpv = {
|
sane.programs.mpv = {
|
||||||
|
configOption = with lib; mkOption {
|
||||||
|
default = {};
|
||||||
|
type = types.submodule {
|
||||||
|
options.vo = mkOption {
|
||||||
|
type = types.nullOr types.string;
|
||||||
|
default = null;
|
||||||
|
description = "--vo=FOO flag to pass to mpv";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
package = pkgs.wrapMpv pkgs.mpv-unwrapped {
|
package = pkgs.wrapMpv pkgs.mpv-unwrapped {
|
||||||
scripts = with pkgs.mpvScripts; [
|
scripts = with pkgs.mpvScripts; [
|
||||||
mpris
|
mpris
|
||||||
# uosc
|
# uosc
|
||||||
pkgs.mpv-uosc-latest
|
pkgs.mpv-uosc-latest
|
||||||
];
|
];
|
||||||
extraMakeWrapperArgs = [
|
extraMakeWrapperArgs = lib.optionals (cfg.config.vo != null) [
|
||||||
# 2023/08/29: fixes an error where mpv on moby launches with the message
|
# 2023/08/29: fixes an error where mpv on moby launches with the message
|
||||||
# "DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory"
|
# "DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory"
|
||||||
# audio still works, and controls, screenshotting, etc -- just not the actual rendering
|
# audio still works, and controls, screenshotting, etc -- just not the actual rendering
|
||||||
# this is likely a regression for mpv 0.36.0.
|
# this is likely a regression for mpv 0.36.0.
|
||||||
# the actual error message *appears* to come from the mesa library, but it's tough to trace.
|
# the actual error message *appears* to come from the mesa library, but it's tough to trace.
|
||||||
|
#
|
||||||
|
# backend compatibility (2023/10/22):
|
||||||
# run with `--vo=help` to see a list of all output options.
|
# run with `--vo=help` to see a list of all output options.
|
||||||
# non-exhaustive (F=fails, W=works)
|
# non-exhaustive (W=works, F=fails, A=audio-only, U=audio+ui only (no video))
|
||||||
# ? libmpv render API for libmpv
|
|
||||||
# ? gpu Shader-based GPU Renderer
|
|
||||||
# ? gpu-next Video output based on libplacebo
|
|
||||||
# ? vdpau VDPAU with X11
|
|
||||||
# ? wlshm Wayland SHM video output (software scaling)
|
|
||||||
# ? xv X11/Xv
|
|
||||||
# W sdl SDL 2.0 Renderer
|
|
||||||
# F dmabuf-wayland Wayland dmabuf video output
|
|
||||||
# ? vaapi VA API with X11
|
|
||||||
# ? x11 X11 (software scaling)
|
|
||||||
# ? null Null video output
|
# ? null Null video output
|
||||||
# ? caca libcaca
|
# A (default)
|
||||||
|
# A dmabuf-wayland Wayland dmabuf video output
|
||||||
|
# A libmpv render API for libmpv (mpv plays the audio, but doesn't even render a window)
|
||||||
|
# A vdpau VDPAU with X11
|
||||||
# F drm Direct Rendering Manager (software scaling)
|
# F drm Direct Rendering Manager (software scaling)
|
||||||
"--add-flags" "--vo=sdl"
|
# F gpu-next Video output based on libplacebo
|
||||||
|
# F vaapi VA API with X11
|
||||||
|
# F x11 X11 (software scaling)
|
||||||
|
# F xv X11/Xv
|
||||||
|
# U gpu Shader-based GPU Renderer
|
||||||
|
# W caca libcaca (terminal rendering)
|
||||||
|
# W sdl SDL 2.0 Renderer
|
||||||
|
# W wlshm Wayland SHM video output (software scaling)
|
||||||
|
"--add-flags" "--vo=${cfg.config.vo}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
persist.plaintext = [ ".local/state/mpv/watch_later" ];
|
persist.plaintext = [ ".local/state/mpv/watch_later" ];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user