From 7f84957ff2c1b023c3b1c3e22ade6881c495b120 Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Sun, 1 Apr 2012 10:54:08 +0000 Subject: [PATCH] mongodb: allow running as a replicaset member also useful for point-in time backups using mongodump --oplog svn path=/nixos/trunk/; revision=33509 --- modules/services/databases/mongodb.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/services/databases/mongodb.nix b/modules/services/databases/mongodb.nix index 28d2a4f849c..c676d3e96e4 100644 --- a/modules/services/databases/mongodb.nix +++ b/modules/services/databases/mongodb.nix @@ -17,6 +17,7 @@ let dbpath = ${cfg.dbpath} logpath = ${cfg.logpath} logappend = ${b2s cfg.logappend} + ${optionalString (cfg.replSetName != "") "replSet = ${cfg.replSetName}"} ''; in @@ -77,6 +78,14 @@ in default = false; description = "Use V8 instead of spidermonkey for js execution"; }; + + replSetName = mkOption { + default = ""; + description = '' + If this instance is part of a replica set, set its name here. + Otherwise, leave empty to run as single node. + ''; + }; }; };