Convert MPV configuration to module
This commit is contained in:
parent
e2df40e518
commit
d48773e9af
5 changed files with 26 additions and 6 deletions
24
modules/home-manager/video/mpv/default.nix
Normal file
24
modules/home-manager/video/mpv/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.video.mpv;
|
||||
in
|
||||
{
|
||||
options.modules.video.mpv = {
|
||||
enable = mkEnableOption "enable MPV video player";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
hwdec = auto-safe;
|
||||
vo = gpu;
|
||||
profile = gpu-hq;
|
||||
gpu-context = wayland;
|
||||
};
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"video/*" = "mpv.desktop";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue