My nix-darwin and NixOS config
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: correct syntax

+7 -4
+7 -4
scripts/migrate-gts-to-sharkey.sh
··· 82 82 83 83 json_to_pem() { 84 84 local mode="$1" # private | public 85 - local json_input 85 + local json_input tmppy 86 86 json_input="$(cat)" 87 - echo "$json_input" | nix shell nixpkgs#python3Packages.cryptography --command \ 88 - python3 -c "$JSON_TO_PEM_PY" "$mode" 87 + tmppy=$(mktemp /tmp/gts_key_convert.XXXXXX.py) 88 + echo "$JSON_TO_PEM_PY" >"$tmppy" 89 + echo "$json_input" | nix-shell -p "python3.withPackages(ps: [ps.cryptography])" \ 90 + --run "python3 $tmppy $mode" 91 + rm -f "$tmppy" 89 92 } 90 93 91 94 # ── Pre-flight ──────────────────────────────────────────────────────────────── 92 95 [[ "$(id -u)" -eq 0 ]] || error "Run as root." 93 96 [[ -f "$GTS_DB" ]] || error "GTS DB not found: $GTS_DB" 94 - for cmd in sqlite3 psql systemctl curl jq nix; do 97 + for cmd in sqlite3 psql systemctl curl jq nix-shell; do 95 98 command -v "$cmd" &>/dev/null || error "Missing required command: $cmd" 96 99 done 97 100