nix: update inputs
[julm/julm-nix.git] / home-manager / profiles / bash.nix
index 270f55dfaf3e73f9177ead045ca81c23117bc817..64c56e23f6f7a756d0c611e4388f4548a6bda3f2 100644 (file)
@@ -40,7 +40,6 @@ with lib;
       w10 = "watch --color --differences --interval 10";
       w = "watch --color --differences";
       watch = "watch --color --differences";
-      yt = "yt-dlp";
       zfs-umount = "zfs-unmount";
     };
     sessionVariables = {
@@ -74,6 +73,13 @@ with lib;
       mkpass () {
         tr -d -C 'A-Za-z0-9' </dev/urandom | head -c 25 | xclip
       }
+      opusenc-voice () {
+        find "$@" -depth -type f -print0 | sort -n -z |
+        xargs -0 -P "$(lscpu --online -p | grep -v "#" | wc -l)" -I {} bash -c '
+            test -e "''${0%.*}".opus ||
+            nice -n 19 ffmpeg -y -i "$0" -map 0:a -b:a 32k -application voip "''${0%.*}".opus
+          ' {} \;
+      }
       smartctl-tbw () {
         device=''${1:-/dev/sda}
         sudo smartctl -A $device |