From 5c61e1f7304a72283a15b545e056f6887c079fd4 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Wed, 9 Mar 2022 21:38:14 +0000 Subject: [PATCH] musicjnis --- home/apps/mpv.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/home/apps/mpv.nix b/home/apps/mpv.nix index 1bf785d..79c15fd 100644 --- a/home/apps/mpv.nix +++ b/home/apps/mpv.nix @@ -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 ]; programs.mpv = { enable = true; @@ -21,5 +27,5 @@ }; programs.zsh.shellAliases.mpv-ontop = "mpv --profile=ontop"; 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''; }