Package mem0ai + self-hosted server in mem0-nix wrapper repo #43

Closed
opened 2026-07-02 07:21:58 +01:00 by nimmo · 0 comments
Owner

Scope

Create the mem0-nix wrapper repo (mirroring the librarry-nix pattern) that packages upstream mem0ai/mem0 for NixOS consumption — no Docker.

Deliverables

  • Forgejo repo created at git.nimmog.uk/nimmo/mem0-nix
  • flake.nix exposing two packages:
    • mem0-server — Python app (FastAPI + uvicorn) built from server/ source
    • mem0-dashboard — Next.js static export from server/dashboard/
  • mem0ai Python library built from upstream pyproject.toml (hatchling build system; deps: qdrant-client, openai, pydantic, httpx, posthog, pytz, sqlalchemy, protobuf)
  • Server requirements.txt deps resolved (fastapi, uvicorn, psycopg, alembic, passlib, python-jose, slowapi, anthropic, google-generativeai)
  • update.sh script to sync upstream HEAD + bump flake.lock
  • Forgejo Actions CI: build both packages on push + schedule
  • README documenting the build and update workflow

Notes

  • The server is a FastAPI app (main:app) served by uvicorn on port 8888.
  • Uses Alembic for DB migrations (run on startup).
  • Postgres + pgvector is the storage backend (packaged as NixOS services in the module, not here).
  • LLM/embedder are configurable — default OpenAI, but Ollama is supported via LLM_PROVIDER=ollama.
  • Dashboard is Next.js (server/dashboard/); build static export and serve via nginx in the NixOS module.
  • Dependency resolution against nixpkgs Python packages will likely need iteration — start with buildPythonPackage + format = "pyproject" for mem0ai, and python3.withPackages or buildPythonApplication for the server env.
## Scope Create the `mem0-nix` wrapper repo (mirroring the `librarry-nix` pattern) that packages upstream [mem0ai/mem0](https://github.com/mem0ai/mem0) for NixOS consumption — **no Docker**. ### Deliverables - [ ] Forgejo repo created at `git.nimmog.uk/nimmo/mem0-nix` - [ ] `flake.nix` exposing two packages: - `mem0-server` — Python app (FastAPI + uvicorn) built from `server/` source - `mem0-dashboard` — Next.js static export from `server/dashboard/` - [ ] `mem0ai` Python library built from upstream `pyproject.toml` (hatchling build system; deps: qdrant-client, openai, pydantic, httpx, posthog, pytz, sqlalchemy, protobuf) - [ ] Server requirements.txt deps resolved (fastapi, uvicorn, psycopg, alembic, passlib, python-jose, slowapi, anthropic, google-generativeai) - [ ] `update.sh` script to sync upstream HEAD + bump flake.lock - [ ] Forgejo Actions CI: build both packages on push + schedule - [ ] README documenting the build and update workflow ### Notes - The server is a FastAPI app (`main:app`) served by uvicorn on port 8888. - Uses Alembic for DB migrations (run on startup). - Postgres + pgvector is the storage backend (packaged as NixOS services in the module, not here). - LLM/embedder are configurable — default OpenAI, but Ollama is supported via `LLM_PROVIDER=ollama`. - Dashboard is Next.js (`server/dashboard/`); build static export and serve via nginx in the NixOS module. - Dependency resolution against nixpkgs Python packages will likely need iteration — start with `buildPythonPackage` + `format = "pyproject"` for mem0ai, and `python3.withPackages` or `buildPythonApplication` for the server env.
nimmo closed this issue 2026-07-11 12:31:34 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#43
No description provided.