34 lines
865 B
Nix
Raw Normal View History

2024-06-19 18:01:28 +03:00
{ config, pkgs, ... }:
2020-08-15 19:36:16 +04:00
{
2022-12-10 22:34:39 +03:00
home-manager.users.${config.mainuser} = {
programs.mpv = {
enable = true;
config = {
vo = "gpu";
gpu-context = "wayland";
save-position-on-quit = "yes";
hwdec = if config.deviceSpecific.devInfo.gpu.vendor == "nvidia" then
"vdpau"
else
"vaapi";
ytdl-format = if config.deviceSpecific.isLaptop then
"bestvideo[height<=?1080]+bestaudio/best"
else
"bestvideo[height<=?2160]+bestaudio/best";
};
2019-09-17 23:07:22 +04:00
};
2022-12-10 22:34:39 +03:00
home.file.".config/yt-dlp/config".text = ''
2023-03-27 20:57:06 +03:00
--cookies-from-browser "firefox:$HOME/.mozilla/firefox/${config.mainuser}"
--mark-watched
'';
};
2023-03-27 16:00:57 +03:00
2024-06-19 18:01:28 +03:00
defaultApplications.media-player = {
cmd = "${pkgs.mpv}/bin/mpv";
desktop = "mpv";
};
2023-03-27 16:00:57 +03:00
persist.state.homeDirectories = [
".config/mpv"
];
2019-09-17 02:20:32 +04:00
}