nixos/odoo: add workers option to settings

This commit is contained in:
Alexander Sieg
2026-04-27 10:22:51 +02:00
parent d6f5f08713
commit 6d72b67f3e
+19 -3
View File
@@ -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 <https://www.odoo.com/documentation/19.0/administration/on_premise/deploy.html#builtin-server>";
};
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 Werkzeugs proxy support. Must be enabled if reverse proxy is used.";
};
};
};
freeformType = format.type;
};
default = { };
description = ''
Odoo configuration settings. For more details see <https://www.odoo.com/documentation/15.0/administration/install/deploy.html>
@@ -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;