mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-20 13:17:28 +00:00
chore(nix): remove rs-surface packages (Garnix CI shutdown)
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 <bigdataiscoming+9i37y6j2@protonmail.com>
This commit is contained in:
parent
1b4f717d13
commit
4c92bab0e5
1 changed files with 4 additions and 77 deletions
81
flake.nix
81
flake.nix
|
|
@ -188,80 +188,9 @@
|
||||||
mkdir -p -m 1777 $out/tmp
|
mkdir -p -m 1777 $out/tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# ── rs-surface binary ───────────────────────────────────────────────────
|
# ── rs-surface binary (removed — Garnix CI shutdown) ──────────────────────
|
||||||
# Rust port of 4-Infrastructure/infra/embedded_surface/server.py.
|
# The Rust source remains at 4-Infrastructure/infra/embedded_surface/rs-surface/
|
||||||
# Build the binary hermetically via rustPlatform.buildRustPackage.
|
# Build locally with: cd 4-Infrastructure/infra/embedded_surface/rs-surface && cargo build --release
|
||||||
#
|
|
||||||
# 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;
|
|
||||||
};
|
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
|
|
@ -303,9 +232,7 @@
|
||||||
maxLayers = 120;
|
maxLayers = 120;
|
||||||
};
|
};
|
||||||
|
|
||||||
# rs-surface binary and OCI image
|
# rs-surface removed (Garnix CI shutdown) — build with cargo directly
|
||||||
rs-surface = rsSurface;
|
|
||||||
rs-surface-image = rsSurfaceImage;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Convenience alias: `nix build .#devcontainer`
|
# Convenience alias: `nix build .#devcontainer`
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue