From 40472e2ff87ad6fcad639ef94748e5eb9b1919b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sat, 6 Feb 2021 14:02:09 +0100 Subject: [PATCH] feat(flix): add simpsons script --- configs/flix.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configs/flix.nix b/configs/flix.nix index 7fed2b6..d87d653 100644 --- a/configs/flix.nix +++ b/configs/flix.nix @@ -48,6 +48,16 @@ in { }; environment.systemPackages = [ + (pkgs.writeDashBin "mpv-simpsons" '' + set -efu + cd "${flixLocation}/download" + [ -f "${cacheLocation}/${indexFilename}" ] || exit 1 + + cat "${cacheLocation}/${indexFilename}" \ + | ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \ + | shuf \ + | ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv + '') (pkgs.writeDashBin "flixmenu" '' set -efu cd "${flixLocation}/download"