nixfiles/home/apps/mpv.nix

32 lines
974 B
Nix
Raw Normal View History

{pkgs, ...}: let
listen-password-file =
if pkgs.stdenv.isLinux
then "/secrets/music_stream_password"
else "$HOME/.secrets/music_stream_password";
2022-03-09 21:38:14 +00:00
in {
2022-12-28 19:16:16 +00:00
home.packages = with pkgs; [ffmpeg yt-dlp];
2022-02-02 15:49:09 +00:00
programs.mpv = {
enable = true;
scripts = with pkgs.mpvScripts; [mpris];
2022-02-02 15:49:09 +00:00
config = {
2022-03-02 16:19:09 +00:00
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
slang = "en";
track-auto-selection = true;
embeddedfonts = false;
sub-ass-force-style = "FontName=Comic Sans MS";
sub-ass-override = "strip";
};
profiles = {
ontop = {
ontop = true;
on-all-workspaces = true;
window-scale = 0.5;
cursor-autohide = 3;
};
2022-02-02 15:49:09 +00:00
};
};
2022-03-02 16:19:09 +00:00
programs.zsh.shellAliases.mpv-ontop = "mpv --profile=ontop";
2022-02-15 11:04:08 +00:00
programs.zsh.shellAliases.listen = ''
mpv "https://music:$(cat ${listen-password-file})@stream.owo.monster/mpd/flac" --cache=yes --cache-pause-initial=yes --cache-pause-wait=5'';
2022-02-02 15:49:09 +00:00
}