← Back to task

Commit d7cf169b

commit d7cf169b1ef83021b16dbb04fe02a5b00b756381
Author: Ben Sima <ben@bensima.com>
Date:   Fri Jan 2 00:19:51 2026

    Omni/Agentd: Add haskell toolchain OCI image
    
    agent-haskell image contains:
    - agent binary
    - busybox
    - git
    - bild (omnirepo build tool)
    - nix
    - CA certs
    
    Image size: ~6GB (due to GHC and Nix)
    
    Build and load:
      bild Omni/Agentd/Images/Haskell.nix
      docker load < _/nix/Omni/Agentd/Images/Haskell.nix
    
    Task-Id: t-320.7

diff --git a/Omni/Agentd/Images/Haskell.nix b/Omni/Agentd/Images/Haskell.nix
new file mode 100644
index 00000000..0b6daa23
--- /dev/null
+++ b/Omni/Agentd/Images/Haskell.nix
@@ -0,0 +1,46 @@
+#!/usr/bin/env run.sh
+# Haskell toolchain OCI image for agentd
+#
+# Contains: agent + busybox + git + ghc + bild + nix
+#
+# Build:
+#   bild Omni/Agentd/Images/Haskell.nix
+#
+# Load into docker:
+#   docker load < _/nix/Omni/Agentd/Images/Haskell.nix
+#
+# Test:
+#   docker run -it agent-haskell bild --help
+#
+# Note: This image is large (~2GB) due to GHC and Nix.
+#
+{
+  bild,
+  packages ? import ../Packages.nix {inherit bild;},
+}:
+bild.image {
+  name = "agent-haskell";
+  tag = "latest";
+  fromImage = null;
+  contents = [
+    packages.agent
+    bild.pkgs.busybox
+    bild.pkgs.git
+    bild.pkgs.cacert
+    # Haskell toolchain
+    bild.bild
+    # Nix for builds
+    bild.pkgs.nix
+  ];
+  config = {
+    Cmd = ["/bin/agent"];
+    WorkingDir = "/workspace";
+    Env = [
+      "PATH=/bin"
+      "SSL_CERT_FILE=${bild.pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
+      "HOME=/root"
+      "GIT_SSL_CAINFO=${bild.pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
+      "NIX_SSL_CERT_FILE=${bild.pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
+    ];
+  };
+}
diff --git a/Omni/Bild.nix b/Omni/Bild.nix
index 9067c880..bb8edeb3 100644
--- a/Omni/Bild.nix
+++ b/Omni/Bild.nix
@@ -149,6 +149,7 @@
         tree
         wemux
         ;
+      nix = stable.pkgs.nix;
       llama-cpp = unstable.llama-cpp;
       llm = unstable.python312.withPackages (p: [p.llm]);
       ollama = unstable.ollama;