nixos/cassandra: Set test VM IPs statically

This commit is contained in:
Daniel Schaefer
2019-06-13 04:36:41 +02:00
parent 545ac1820f
commit 2368345052
+7 -1
View File
@@ -14,7 +14,13 @@ let
};
nodeCfg = ipAddress: extra: {pkgs, config, ...}:
{ environment.systemPackages = [ testPackage ];
networking.firewall.enable = false;
networking = {
firewall.allowedTCPPorts = [ 7000 7199 9042 ];
useDHCP = false;
interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
{ address = ipAddress; prefixLength = 24; }
];
};
services.cassandra = cassandraCfg ipAddress // extra;
virtualisation.memorySize = 1024;
};