From 6d72b67f3e363471f2e670ec3d9599f412654792 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Mon, 27 Apr 2026 10:22:51 +0200 Subject: [PATCH] nixos/odoo: add workers option to settings --- nixos/modules/services/finance/odoo.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/finance/odoo.nix b/nixos/modules/services/finance/odoo.nix index 422ca7240a85..6165e521bda7 100644 --- a/nixos/modules/services/finance/odoo.nix +++ b/nixos/modules/services/finance/odoo.nix @@ -46,7 +46,24 @@ in }; settings = lib.mkOption { - type = format.type; + type = lib.types.submodule { + options = { + options = { + workers = lib.mkOption { + type = lib.types.ints.unsigned; + default = 0; + description = "Values above 0 will enable the multi-processing HTTP server, this should be set for production setups. This needs to be set to >0 for real-time connections in the discuss app. For configuration recommendations see "; + }; + proxy_mode = lib.mkOption { + type = lib.types.bool; + default = cfg.domain != null; + defaultText = "services.odoo.domain != null"; + description = "Enables the use of X-Forwarded-* headers through Werkzeug’s proxy support. Must be enabled if reverse proxy is used."; + }; + }; + }; + freeformType = format.type; + }; default = { }; description = '' Odoo configuration settings. For more details see @@ -96,7 +113,7 @@ in ''; locations = { - "/longpolling" = { + "/websocket" = { proxyPass = "http://odoochat"; }; @@ -127,7 +144,6 @@ in ); settings.options = { data_dir = "/var/lib/private/odoo/data"; - proxy_mode = cfg.domain != null; # Disable the database manager by default # https://www.odoo.com/documentation/master/administration/on_premise/deploy.html#database-manager-security list_db = lib.mkDefault false;