small constellation + pds based little profile viewer karitham.tngl.io/gpreview?user=karitham.dev
gleam bsky-profile
0
fork

Configure Feed

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

CI :+1:

+73 -3
+70
.tangled/workflows/deploy-site.yml
··· 1 + when: 2 + - event: ["push"] 3 + branch: ["main"] 4 + 5 + engine: "nixery" 6 + 7 + dependencies: 8 + github:NixOS/nixpkgs/nixpkgs-unstable: 9 + - gleam 10 + - erlang 11 + - bun 12 + - tailwindcss_4 13 + - elixir 14 + - nodejs 15 + - rebar3 16 + - openssh 17 + - git 18 + - nss_wrapper 19 + - gnused 20 + 21 + steps: 22 + - name: Install dependencies 23 + command: gleam deps download 24 + 25 + - name: Build app 26 + command: gleam run -m lustre/dev build --minify --outdir=dist 27 + 28 + - name: Fix asset paths for subdirectory deployment 29 + command: | 30 + # Rewrite root-relative paths to /gpreview subdirectory 31 + sed -i 's|href="/gpreview\.css"|href="/gpreview/gpreview.css"|g' dist/index.html 32 + sed -i 's|src="/gpreview\.js"|src="/gpreview/gpreview.js"|g' dist/index.html 33 + 34 + - name: Push to dist branch 35 + command: | 36 + # 1. Identity Setup (NSS Wrapper files) 37 + export HOME_DIR=$(pwd)/.git_home 38 + mkdir -p "$HOME_DIR/.ssh" 39 + echo "root:x:0:0:root:$HOME_DIR:/bin/sh" > "$HOME_DIR/passwd" 40 + echo "root:x:0:" > "$HOME_DIR/group" 41 + 42 + # 2. Resolve nss_wrapper path 43 + NSS_PATH=$(nix build github:NixOS/nixpkgs/nixpkgs-unstable#nss_wrapper \ 44 + --no-link --print-out-paths \ 45 + --extra-experimental-features "nix-command flakes") 46 + export NSS_LIB="$NSS_PATH/lib/libnss_wrapper.so" 47 + 48 + # 3. SSH Setup 49 + echo "$DEPLOY_KEY" > "$HOME_DIR/id_ed25519" 50 + chmod 600 "$HOME_DIR/id_ed25519" 51 + 52 + # Use ssh-keyscan to trust the remote host dynamically 53 + # We target port 22 (default) for tangled.org 54 + ssh-keyscan -t ed25519 tangled.org > "$HOME_DIR/known_hosts" 2>/dev/null 55 + 56 + # 4. Git Initialization 57 + cd dist 58 + git init 59 + git config user.name "Tangled Spindle" 60 + git config user.email "deploy@tangled.org" 61 + git add . 62 + git commit -m "Deploy ${TANGLED_SHA}" 63 + git branch -M dist 64 + git remote add origin "ssh://git@tangled.org/karitham.dev/gpreview" 65 + 66 + # 5. The Push 67 + # We use our LD_PRELOAD trick to bypass the 'uid 0' issue 68 + export GIT_SSH_COMMAND="env LD_PRELOAD=$NSS_LIB NSS_WRAPPER_PASSWD=$HOME_DIR/passwd NSS_WRAPPER_GROUP=$HOME_DIR/group ssh -F /dev/null -i $HOME_DIR/id_ed25519 -o UserKnownHostsFile=$HOME_DIR/known_hosts -o StrictHostKeyChecking=yes" 69 + 70 + git push --force origin dist
+3 -3
flake.lock
··· 2 2 "nodes": { 3 3 "nixpkgs": { 4 4 "locked": { 5 - "lastModified": 1772736753, 6 - "narHash": "sha256-au/m3+EuBLoSzWUCb64a/MZq6QUtOV8oC0D9tY2scPQ=", 5 + "lastModified": 1776329215, 6 + "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", 7 7 "owner": "NixOS", 8 8 "repo": "nixpkgs", 9 - "rev": "917fec990948658ef1ccd07cef2a1ef060786846", 9 + "rev": "b86751bc4085f48661017fa226dee99fab6c651b", 10 10 "type": "github" 11 11 }, 12 12 "original": {