38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
makeMpvProfile = shader: {
|
|
glsl-shaders = "~/.config/mpv/shaders/${shader}";
|
|
scale = "ewa_lanczossharp";
|
|
cscale = "ewa_lanczossharp";
|
|
gpu-context = "auto";
|
|
gpu-api = "opengl";
|
|
hwdec = "vaapi";
|
|
vo = "gpu";
|
|
video-sync = "display-resample";
|
|
interpolation = "";
|
|
tscale = "oversample";
|
|
};
|
|
in {
|
|
environment.systemPackages = [ pkgs.mpv ];
|
|
|
|
home-manager.users.alexander = {
|
|
xdg.configFile = {
|
|
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl;
|
|
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl;
|
|
};
|
|
|
|
programs.mpv = {
|
|
enable = true;
|
|
config = {
|
|
script-opts = "try_ytdl_first=no";
|
|
};
|
|
defaultProfiles = [ "anime" ];
|
|
profiles = {
|
|
anime = (makeMpvProfile "Anime4K_Upscale_CNN_UL_x2_Deblur.glsl");
|
|
"anime-denoise" = (makeMpvProfile "Anime4K_Upscale_CNN_UL_x2_Denoise.glsl");
|
|
};
|
|
};
|
|
};
|
|
}
|