From e5a41e58cd45e0015c5197f88d2bbe913f1bf34a Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Sun, 22 Feb 2026 08:55:56 -0800 Subject: [PATCH] tb-scripts: add .sh extensions and add ,yt-dlp wrapper Rename all shell script files to use .sh extensions for consistency and better editor support (pushover-send, split-1G, xz, zipdir). Update default.nix references to match the new filenames. Add a new ,yt-dlp script that runs yt-dlp from nixpkgs-unstable via `nix run`, so it's always up to date without needing to be in the system packages. Co-Authored-By: Claude Opus 4.6 --- pkgs/tb-scripts/default.nix | 14 ++++++++++---- .../tb-scripts/{pushover-send => pushover-send.sh} | 0 pkgs/tb-scripts/{split-1G => split-1G.sh} | 0 pkgs/tb-scripts/{xz => xz.sh} | 0 pkgs/tb-scripts/yt-dlp.sh | 3 +++ pkgs/tb-scripts/{zipdir => zipdir.sh} | 0 6 files changed, 13 insertions(+), 4 deletions(-) rename pkgs/tb-scripts/{pushover-send => pushover-send.sh} (100%) rename pkgs/tb-scripts/{split-1G => split-1G.sh} (100%) rename pkgs/tb-scripts/{xz => xz.sh} (100%) create mode 100644 pkgs/tb-scripts/yt-dlp.sh rename pkgs/tb-scripts/{zipdir => zipdir.sh} (100%) diff --git a/pkgs/tb-scripts/default.nix b/pkgs/tb-scripts/default.nix index 3bcb61c..7f0c3ca 100644 --- a/pkgs/tb-scripts/default.nix +++ b/pkgs/tb-scripts/default.nix @@ -20,25 +20,31 @@ pkgs.symlinkJoin { (pkgs.writeShellApplication { name = ",zipdir"; runtimeInputs = [ pkgs.zip ]; - text = builtins.readFile ./zipdir; + text = builtins.readFile ./zipdir.sh; }) (pkgs.writeShellApplication { name = ",split-1G"; runtimeInputs = [ pkgs.coreutils ]; - text = builtins.readFile ./split-1G; + text = builtins.readFile ./split-1G.sh; }) (pkgs.writeShellApplication { name = ",pushover-send"; runtimeInputs = [ pkgs.curl ]; - text = builtins.readFile ./pushover-send; + text = builtins.readFile ./pushover-send.sh; }) (pkgs.writeShellApplication { name = ",xz"; runtimeInputs = [ pkgs.xz ]; - text = builtins.readFile ./xz; + text = builtins.readFile ./xz.sh; + }) + + (pkgs.writeShellApplication { + name = ",yt-dlp"; + runtimeInputs = [ pkgs.nix ]; + text = builtins.readFile ./yt-dlp.sh; }) ]; } diff --git a/pkgs/tb-scripts/pushover-send b/pkgs/tb-scripts/pushover-send.sh similarity index 100% rename from pkgs/tb-scripts/pushover-send rename to pkgs/tb-scripts/pushover-send.sh diff --git a/pkgs/tb-scripts/split-1G b/pkgs/tb-scripts/split-1G.sh similarity index 100% rename from pkgs/tb-scripts/split-1G rename to pkgs/tb-scripts/split-1G.sh diff --git a/pkgs/tb-scripts/xz b/pkgs/tb-scripts/xz.sh similarity index 100% rename from pkgs/tb-scripts/xz rename to pkgs/tb-scripts/xz.sh diff --git a/pkgs/tb-scripts/yt-dlp.sh b/pkgs/tb-scripts/yt-dlp.sh new file mode 100644 index 0000000..f637adc --- /dev/null +++ b/pkgs/tb-scripts/yt-dlp.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec nix run nixpkgs/nixpkgs-unstable#yt-dlp -- "$@" diff --git a/pkgs/tb-scripts/zipdir b/pkgs/tb-scripts/zipdir.sh similarity index 100% rename from pkgs/tb-scripts/zipdir rename to pkgs/tb-scripts/zipdir.sh