feat: add tea-init script

This commit is contained in:
Jet 2026-03-18 16:40:39 -07:00
parent 4ad63d7981
commit 9f919ad68e
No known key found for this signature in database

View file

@ -68,6 +68,20 @@ in
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
# Scripts
(writeShellScriptBin "tea-init" ''
name="''${1:-$(basename "$PWD")}"
login="''${2:-git.extremist.software}"
user=$(tea logins list -o simple | awk -v l="$login" '$2 == "https://"l {print $4}')
if [ -z "$user" ]; then
echo "error: no tea login found for $login" >&2
exit 1
fi
tea repo create --name "$name" --login "$login"
git remote add origin "git@''${login}:''${user}/''${name}.git"
git push -u origin "$(git branch --show-current)"
'')
# CLI # CLI
bat bat
ffmpeg-full ffmpeg-full