musicjnis

This commit is contained in:
ChaotiCryptidz 2022-03-09 21:38:14 +00:00
parent 209333d542
commit 5c61e1f730
No known key found for this signature in database

View file

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