diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix index 1eba6fdc60af..c9270d24d479 100644 --- a/nixos/modules/services/databases/mongodb.nix +++ b/nixos/modules/services/databases/mongodb.nix @@ -164,6 +164,8 @@ in rm ${cfg.dbpath}/mongod.lock || true if ! test -e ${cfg.dbpath}; then install -d -m0700 -o ${cfg.user} ${cfg.dbpath} + fi + if ! test -e ${cfg.dbpath}/storage.bson; then # See postStart! touch ${cfg.dbpath}/.first_startup fi