Skip to content

odoo-nix

Reproducible Nix infrastructure for Odoo Community (OCB) and OCA, from scaffolding projects and addon repositories to repository standards, CI, containers, and NixOS.

NixOSActiveMIT
View on GitHub (opens in a new tab)Documentation (opens in a new tab)
Platform

NixOS

License
MIT
Status
Active
Repository
Part of

The Nix platform

Odoo Community plus OCA modules is a capable, open alternative to Odoo Enterprise, but assembling the right repositories, Python dependencies, and configuration by hand is fiddly. odoo-nix builds the whole project from a small source tree and a short flake, so development, CI, and production all run the same Odoo. It's for Odoo developers and integrators, and for businesses that want to self-host Odoo without lock-in.

Features

  • Scaffolding. nix run github:Avunu/odoo-nix picks an Odoo series (18.0, 19.0, or 20.0) and, optionally, OCA bundles or individual modules from a bundled catalog. It resolves the repos those modules depend on and adds them as git submodules.

  • Addon repositories. A repository of addons, laid out the way the OCA publishes them, gets a development shell of its own: OCB and the repositories its addons depend on come in as flake inputs, and the dev shell installs every addon in it. Our own Odoo addons are built this way.

  • Configuration that can't drift. addons_path is derived from the folders actually present, and odoo.conf is generated from your flake.

  • Development shell. PostgreSQL, Odoo, and Mailpit through devenv, with live reload, editor integration, and a reproducible Python environment through uv2nix.

  • One CLI. odoo handles database provisioning, migration, backup, and restore; adding OCA modules and bundles; and passes everything else to odoo-bin.

  • Repository standards. One table in pyproject.toml picks a profile, and the odoo-nix command writes and checks each repository's lint, format, test, editor, Dependabot, and CI files: the OCA's per-series rules, with the tools locked by Nix so the editor, the dev shell, and CI run the same versions. Reusable GitHub workflows run the lint and test gates, check commit messages, and release addon repositories from develop to their series branch. Avunu's own profile is public as odoo-standards-profile.

  • Tests that mean it. odoo test can install every addon on a fresh database, refuses to report a pass when browser tours would be skipped, and measures coverage, which only ratchets up.

  • Production. A services.odoo-nix NixOS module that keeps secrets out of the Nix store and migrates the schema before every start, with a snapshot and rollback if it fails. OCI container images too.

  • Shared logging conventions with frappe-nix and wordpress-nix, so one query covers all three.

Getting started

You need Nix with flakes and direnv. Run the scaffolder, then follow Getting started in the documentation:

nix run github:Avunu/odoo-nix                    # interactive (gum prompts)
nix run github:Avunu/odoo-nix -- --addons        # in a repository of addons

Related projects

All open-source projects

frappe-nix

Active

Reproducible Nix infrastructure for Frappe and ERPNext, from the development shell to OCI containers and a multi-site NixOS module.

A fast FrankenPHP WordPress stack built with Nix, deployable as OCI containers or a NixOS module, with MySQL, Cloudflare D1, or Turso databases.

Web Kiosk

Stable

A USB-booting NixOS image that turns an x86 computer into a locked-down Firefox kiosk for a single web page.

Need help with it?

Need this implemented? Our Odoo implementation team builds on it, and we host Odoo on this platform as managed infrastructure.