From 4c92bab0e5349a5362f4863cc56b402b44bfcc57 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 20:44:03 +0000 Subject: [PATCH] chore(nix): remove rs-surface packages (Garnix CI shutdown) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Garnix is being shut down and the cargo hash mismatch causes perpetual CI failures. The Rust source is preserved at 4-Infrastructure/infra/embedded_surface/rs-surface/ — build directly with cargo when needed. Co-Authored-By: Allaun Silverfox --- flake.nix | 81 +++---------------------------------------------------- 1 file changed, 4 insertions(+), 77 deletions(-) diff --git a/flake.nix b/flake.nix index 3f220b70..e7f89197 100644 --- a/flake.nix +++ b/flake.nix @@ -188,80 +188,9 @@ mkdir -p -m 1777 $out/tmp ''; - # ── rs-surface binary ─────────────────────────────────────────────────── - # Rust port of 4-Infrastructure/infra/embedded_surface/server.py. - # Build the binary hermetically via rustPlatform.buildRustPackage. - # - # cargoHash: run `nix build .#rs-surface 2>&1 | grep "got:"` to get the - # real hash after any Cargo.lock change, then replace lib.fakeHash below. - rsSurface = pkgs.rustPlatform.buildRustPackage { - pname = "rs-surface"; - version = "0.1.0"; - - src = pkgs.lib.cleanSource ./4-Infrastructure/infra/embedded_surface/rs-surface; - - cargoLock.lockFile = ./4-Infrastructure/infra/embedded_surface/rs-surface/Cargo.lock; - - nativeBuildInputs = [ pkgs.pkg-config ]; - buildInputs = [ pkgs.openssl ]; - - meta = { - description = "Embedded node surface daemon (Rust)"; - license = pkgs.lib.licenses.mit; - mainProgram = "rs-surface"; - }; - }; - - # ── Minimal OCI image for the embedded node surface ──────────────────── - # Built entirely from the Nix store — no Dockerfile, no Alpine, no musl. - # The closure contains only the binary + its glibc runtime deps. - # - # Build: nix build .#rs-surface-image - # Load: docker load < result - # Run: docker run --rm -p 8080:8080 -v /etc/rs-surface:/etc/rs-surface rs-surface:latest - rsSurfaceImage = pkgs.dockerTools.buildLayeredImage { - name = "rs-surface"; - tag = "latest"; - - contents = [ - rsSurface - pkgs.cacert # TLS roots (for any outbound HTTPS) - pkgs.coreutils # minimal shell utilities for healthcheck - ]; - - # /etc/rs-surface/node.json is volume-mounted at runtime; create the - # directory so the mount point exists in the image. - extraCommands = '' - mkdir -p etc/rs-surface var/lib/rs-surface mnt/topological-storage - ''; - - config = { - Entrypoint = [ "${rsSurface}/bin/rs-surface" ]; - Env = [ - "RS_SURFACE_PROFILE=/etc/rs-surface/node.json" - "RS_SURFACE_STATE=/var/lib/rs-surface" - "RS_SURFACE_MOUNT=/mnt/topological-storage" - "RS_SURFACE_HOST=0.0.0.0" - "RS_SURFACE_PORT=8080" - "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" - ]; - ExposedPorts = { "8080/tcp" = {}; }; - Healthcheck = { - Test = [ "CMD" "${pkgs.coreutils}/bin/sh" "-c" - "wget -qO- http://127.0.0.1:8080/health || exit 1" ]; - Interval = 10000000000; # 10 s in nanoseconds - Timeout = 3000000000; # 3 s - StartPeriod = 3000000000; # 3 s - Retries = 3; - }; - Labels = { - "org.opencontainers.image.description" = "rs-surface embedded node daemon"; - "org.opencontainers.image.source" = "4-Infrastructure/infra/embedded_surface/rs-surface"; - }; - }; - - maxLayers = 10; - }; + # ── rs-surface binary (removed — Garnix CI shutdown) ────────────────────── + # The Rust source remains at 4-Infrastructure/infra/embedded_surface/rs-surface/ + # Build locally with: cd 4-Infrastructure/infra/embedded_surface/rs-surface && cargo build --release in rec { packages.${system} = { @@ -303,9 +232,7 @@ maxLayers = 120; }; - # rs-surface binary and OCI image - rs-surface = rsSurface; - rs-surface-image = rsSurfaceImage; + # rs-surface removed (Garnix CI shutdown) — build with cargo directly }; # Convenience alias: `nix build .#devcontainer`