Public repo: .#loop fetches over public HTTPS, README for outsiders
ci / check (push) Successful in 8s

- flake.nix: .#loop runs git+https://gitea.surma.technology/surma/sausage
  (SAUSAGE_FLAKE overrides it); drop loop-internal / --internal (LAN SSH).
- README: clone step, LLM token requirement, loop URL and SAUSAGE_FLAKE.
- ci.yml: comment without internal host name.
This commit is contained in:
Sausage Agent
2026-10-16 20:40:26 +00:00
parent c1f182d9b6
commit d0876626df
3 changed files with 15 additions and 14 deletions
+7 -9
View File
@@ -36,15 +36,14 @@
meta.mainProgram = "sausage";
};
# `nix run .#loop -- <world>` runs the newest `sausage run <world>`
# from the Gitea repo, again and again: after a crash or a broker
# from the public repo, again and again: after a crash or a broker
# `exit` request it refreshes the flake and starts the host again,
# so the world updates itself. `/quit` (exit code 0) ends the loop.
# `--internal` (or `.#loop-internal`) uses Gitea's SSH port on the LAN.
publicUrl = "git+ssh://containeruser@gitea.surma.technology:2222/surma/sausage";
internalUrl = "git+ssh://containeruser@10.0.0.2:2222/surma/sausage";
loop = name: url: pkgs.writeShellScriptBin name ''
url="${url}"
if [ "''${1:-}" = "--internal" ]; then url="${internalUrl}"; shift; fi
# SAUSAGE_FLAKE overrides where it fetches from (any flake URL,
# e.g. a fork or a local checkout).
repoUrl = "git+https://gitea.surma.technology/surma/sausage";
loop = pkgs.writeShellScriptBin "sausage-loop" ''
url="''${SAUSAGE_FLAKE:-${repoUrl}}"
if [ $# -eq 0 ]; then set -- world; fi
while true; do
nix run --refresh "$url#default" -- run "$@"
@@ -72,8 +71,7 @@
});
apps.default = { type = "app"; program = "${sausage}/bin/sausage"; };
apps.loop = { type = "app"; program = "${loop "sausage-loop" publicUrl}/bin/sausage-loop"; };
apps.loop-internal = { type = "app"; program = "${loop "sausage-loop-internal" internalUrl}/bin/sausage-loop-internal"; };
apps.loop = { type = "app"; program = "${loop}/bin/sausage-loop"; };
devShells.default = pkgs.mkShell {
packages = [ rust pkgs.wasmtime pkgs.wasm-tools ];