diff options
author | Daniel Schaefer <git@danielschaefer.me> | 2019-04-07 05:02:51 +0200 |
---|---|---|
committer | Daniel Schaefer <git@danielschaefer.me> | 2019-06-13 04:34:03 +0200 |
commit | 746b82bd4a6226f40b89d97856576fcaa117cb5c (patch) | |
tree | 74fc549f7da55eaa5d1b3fb8a85fb2acfe76e04c /nixos | |
parent | a2aa01be0c4536985701984c8db2bd75c3a25934 (diff) |
nixos/cassandra: Allow setting of seed addresses
Allow for more intuitive specifying of seed node addresses with Nix
syntax.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/databases/cassandra.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix index af0c29405c8f..ee6c092f0a45 100644 --- a/nixos/modules/services/databases/cassandra.nix +++ b/nixos/modules/services/databases/cassandra.nix @@ -13,7 +13,7 @@ let endpoint_snitch = "SimpleSnitch"; seed_provider = [{ class_name = "org.apache.cassandra.locator.SimpleSeedProvider"; - parameters = [ { seeds = "127.0.0.1"; } ]; + parameters = [ { seeds = concatStringsSep "," cfg.seedAddresses; } ]; }]; data_file_directories = [ "${cfg.homeDir}/data" ]; commitlog_directory = "${cfg.homeDir}/commitlog"; @@ -163,6 +163,16 @@ in { XML logback configuration for cassandra ''; }; + seedAddresses = mkOption { + type = types.listOf types.str; + default = [ "127.0.0.1" ]; + description = '' + The addresses of hosts designated as contact points in the cluster. A + joining node contacts one of the nodes in the seeds list to learn the + topology of the ring. + Set to 127.0.0.1 for a single node cluster. + ''; + }; allowClients = mkOption { type = types.bool; default = true; |