Author: mkwik
Date: Sun Apr  1 10:54:08 2012
New Revision: 33509
URL: https://nixos.org/websvn/nix/?rev=33509&sc=1

Log:
mongodb: allow running as a replicaset member

also useful for point-in time backups using mongodump --oplog

Modified:
   nixos/trunk/modules/services/databases/mongodb.nix

Modified: nixos/trunk/modules/services/databases/mongodb.nix
==============================================================================
--- nixos/trunk/modules/services/databases/mongodb.nix  Sun Apr  1 10:54:06 
2012        (r33508)
+++ nixos/trunk/modules/services/databases/mongodb.nix  Sun Apr  1 10:54:08 
2012        (r33509)
@@ -17,6 +17,7 @@
     dbpath = ${cfg.dbpath}
     logpath = ${cfg.logpath}
     logappend = ${b2s cfg.logappend}
+    ${optionalString (cfg.replSetName != "") "replSet = ${cfg.replSetName}"}
   '';
 
 in
@@ -77,6 +78,14 @@
         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.
+        '';
+      };
     };
 
   };
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to