2022-12-04 13:45:43 +00:00
|
|
|
{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;
|
2023-01-06 11:26:25 +00:00
|
|
|
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 = ''
|
2023-10-27 16:44:17 +01:00
|
|
|
mpv "https://music:$(cat ${listen-password-file})@mpd.owo.monster/flac" --cache=yes --cache-pause-initial=yes --cache-pause-wait=5'';
|
2022-02-02 15:49:09 +00:00
|
|
|
}
|