# The brain's channel, with node, and what make install puts in place: # bin/brain-channel HOST PORT KEYFILE [IR_URL IR_KEYFILE [REPO TOKENFILE ASSIGNEE [LOOK_URL LOOK_KEYFILE]]] # bin/tmux the unit's tmux, to attach with: a client must match its server # share/pdtv26-brain/pdtv26-brain.service the sandboxed session, a systemd user unit # share/pdtv26-brain/CLAUDE.md its instructions, which name src, its own source, to read # share/pdtv26-brain/household.md an example of who's who { callPackage, runCommand, nodejs-slim, tmux, bubblewrap, src }: let js = callPackage ./default.nix { }; in runCommand "pdtv26-brain" { } '' mkdir -p $out/bin $out/share/pdtv26-brain printf '#!/bin/sh\nexec %s %s/lib/node_modules/pdtv26-brain/channel.js "$@"\n' ${nodejs-slim}/bin/node ${js} > $out/bin/brain-channel chmod +x $out/bin/brain-channel ln -s ${tmux}/bin/tmux $out/bin/tmux substitute ${./brain.service} $out/share/pdtv26-brain/pdtv26-brain.service \ --subst-var-by tmux ${tmux} --subst-var-by bubblewrap ${bubblewrap} --subst-var-by src ${src} substitute ${./instructions.md} $out/share/pdtv26-brain/CLAUDE.md --replace-fail @SRC@ ${src} cp ${./household.md} $out/share/pdtv26-brain/household.md ''