mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
nixos/odoo: add autoInit option
When enabled, Odoo will automatically initialize the database on startup.
This commit is contained in:
parent
750f1478fc
commit
c570314635
@ -20,6 +20,8 @@ in
|
||||
description = "Odoo addons.";
|
||||
};
|
||||
|
||||
autoInit = mkEnableOption "automatically initialize the DB";
|
||||
|
||||
settings = mkOption {
|
||||
type = format.type;
|
||||
default = {};
|
||||
@ -113,7 +115,9 @@ in
|
||||
"HOME=%S/odoo"
|
||||
"ODOO_RC=${cfgFile}"
|
||||
];
|
||||
};
|
||||
} // (lib.optionalAttrs cfg.autoInit {
|
||||
ExecStartPre = "${cfg.package}/bin/odoo --init=INIT --database=odoo --db_user=odoo --stop-after-init";
|
||||
});
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
|
Loading…
Reference in New Issue
Block a user