diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..4938f24 --- /dev/null +++ b/shell.nix @@ -0,0 +1,45 @@ +{pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = [ + pkgs.cbonsai + pkgs.cmatrix + pkgs.neo-cowsay + pkgs.fortune + pkgs.nyancat + pkgs.coreutils + ]; + + shellHook = '' + STIME=5 + programs=("cbonsai" "cmatrix" "nyancat" "fortuneCow") + + while true; do + choice=$(shuf -n 1 -e "cbonsai" "cmatrix" "nyancat" "fortuneCow") + clear + tput sgr0 + case "$choice" in + cbonsai) + timeout "$STIME" cbonsai -t .2 -l + reset + clear + ;; + cmatrix) + timeout "$STIME" cmatrix + reset + clear + ;; + nyancat) + timeout "$STIME" nyancat + reset + clear + ;; + fortuneCow) + fortune | cowsay + sleep "$STIME" + clear + ;; + esac + done + ''; +}