nixfiles/home/apps/mpv.nix
ChaotiCryptidz 5c61e1f730
musicjnis
2022-03-09 21:38:14 +00:00

32 lines
939 B
Nix

{ config, pkgs, ... }:
let
listen-password-file = if pkgs.stdenv.isLinux then
"/secrets/music-stream-password"
else
"$HOME/.secrets/music-stream-password";
in {
home.packages = with pkgs; [ mpv ffmpeg yt-dlp ];
programs.mpv = {
enable = true;
config = {
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;
};
};
};
programs.zsh.shellAliases.mpv-ontop = "mpv --profile=ontop";
programs.zsh.shellAliases.listen = ''
mpv "https://music:$(cat ${listen-password-file})@stream.owo.monster/flac" --cache=yes --cache-pause-initial=yes --cache-pause-wait=5'';
}