summary refs log tree commit diff
path: root/nixos/modules/services/misc
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2014-12-01 16:57:17 +0100
committerJaka Hudoklin <jakahudoklin@gmail.com>2014-12-01 16:57:17 +0100
commit827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e (patch)
tree728d3950d400d326ebbd03604c801f5fc57c66fe /nixos/modules/services/misc
parent5fa87a9df78ca69587cc99eaf162dd1c30ddbc6c (diff)
downloadnixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.tar
nixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.tar.gz
nixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.tar.bz2
nixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.tar.lz
nixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.tar.xz
nixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.tar.zst
nixlib-827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e.zip
nixos/mesos: convert quorum to string
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r--nixos/modules/services/misc/mesos-master.nix20
1 files changed, 10 insertions, 10 deletions
diff --git a/nixos/modules/services/misc/mesos-master.nix b/nixos/modules/services/misc/mesos-master.nix
index bdf88d427c5d..89ced530e532 100644
--- a/nixos/modules/services/misc/mesos-master.nix
+++ b/nixos/modules/services/misc/mesos-master.nix
@@ -4,11 +4,11 @@ with lib;
 
 let
   cfg = config.services.mesos.master;
-  
+
 in {
 
   options.services.mesos = {
-    
+
     master = {
       enable = mkOption {
         description = "Whether to enable the Mesos Master.";
@@ -31,36 +31,36 @@ in {
         '';
         type = types.str;
       };
-      
+
       workDir = mkOption {
         description = "The Mesos work directory.";
         default = "/var/lib/mesos/master";
         type = types.str;
       };
-      
+
       extraCmdLineOptions = mkOption {
         description = ''
 	  Extra command line options for Mesos Master.
-	  
+
 	  See https://mesos.apache.org/documentation/latest/configuration/
 	'';
         default = [ "" ];
         type = types.listOf types.string;
         example = [ "--credentials=VALUE" ];
       };
-      
+
       quorum = mkOption {
         description = ''
           The size of the quorum of replicas when using 'replicated_log' based
           registry. It is imperative to set this value to be a majority of
           masters i.e., quorum > (number of masters)/2.
-          
+
           If 0 will fall back to --registry=in_memory.
         '';
         default = 0;
         type = types.int;
       };
-      
+
       logLevel = mkOption {
         description = ''
           The logging level used. Possible values:
@@ -86,7 +86,7 @@ in {
 	  ${pkgs.mesos}/bin/mesos-master \
 	    --port=${toString cfg.port} \
 	    --zk=${cfg.zk} \
-	    ${if cfg.quorum == 0 then "--registry=in_memory" else "--registry=replicated_log --quorum=${cfg.quorum}"} \
+	    ${if cfg.quorum == 0 then "--registry=in_memory" else "--registry=replicated_log --quorum=${toString cfg.quorum}"} \
 	    --work_dir=${cfg.workDir} \
 	    --logging_level=${cfg.logLevel} \
 	    ${toString cfg.extraCmdLineOptions}
@@ -98,6 +98,6 @@ in {
       '';
     };
   };
-  
+
 }