1
0
Files
nix-shared/pkgs/tb-scripts/default.nix
Timo Bingmann e5a41e58cd 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 <noreply@anthropic.com>
2026-02-22 08:55:56 -08:00

51 lines
1.2 KiB
Nix

{ pkgs }:
pkgs.symlinkJoin {
name = "tb-scripts";
meta = {
description = "Custom utility scripts for TB - available on all systems";
maintainers = [ ];
};
paths = [
(pkgs.writeShellApplication {
name = ",jq_reformat";
runtimeInputs = [ pkgs.jq ];
text = builtins.readFile ./jq_reformat.sh;
})
(pkgs.writers.writePython3Bin ",rename_lower" {
libraries = [ ];
} (builtins.readFile ./rename_lower.py))
(pkgs.writeShellApplication {
name = ",zipdir";
runtimeInputs = [ pkgs.zip ];
text = builtins.readFile ./zipdir.sh;
})
(pkgs.writeShellApplication {
name = ",split-1G";
runtimeInputs = [ pkgs.coreutils ];
text = builtins.readFile ./split-1G.sh;
})
(pkgs.writeShellApplication {
name = ",pushover-send";
runtimeInputs = [ pkgs.curl ];
text = builtins.readFile ./pushover-send.sh;
})
(pkgs.writeShellApplication {
name = ",xz";
runtimeInputs = [ pkgs.xz ];
text = builtins.readFile ./xz.sh;
})
(pkgs.writeShellApplication {
name = ",yt-dlp";
runtimeInputs = [ pkgs.nix ];
text = builtins.readFile ./yt-dlp.sh;
})
];
}