This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 2configs / consul.nix
1.6 kB 67 lines
1{ config, lib, ... }: 2{ 3 services.consul = { 4 enable = true; 5 # dropPrivileges = false; 6 webUi = true; 7 # interface.bind = "retiolum"; 8 extraConfig = { 9 bind_addr = config.krebs.build.host.nets.retiolum.ip4.addr; 10 bootstrap_expect = 3; 11 server = true; 12 # retry_join = config.services.consul.extraConfig.start_join; 13 retry_join = lib.mapAttrsToList (_n: h: lib.head h.nets.retiolum.aliases) ( 14 lib.filterAttrs (_n: h: h.consul) config.krebs.hosts 15 ); 16 rejoin_after_leave = true; 17 18 # try to fix random lock loss on leader reelection 19 retry_interval = "3s"; 20 }; 21 }; 22 23 environment.etc."consul.d/testservice.json".text = builtins.toJSON { 24 service = { 25 name = "testing"; 26 }; 27 }; 28 29 krebs.iptables.tables.filter.INPUT.rules = [ 30 { 31 predicate = "-i retiolum -p tcp --dport 8300"; 32 target = "ACCEPT"; 33 } 34 { 35 predicate = "-i retiolum -p tcp --dport 8301"; 36 target = "ACCEPT"; 37 } 38 { 39 predicate = "-i retiolum -p udp --dport 8301"; 40 target = "ACCEPT"; 41 } 42 { 43 predicate = "-i retiolum -p tcp --dport 8302"; 44 target = "ACCEPT"; 45 } 46 { 47 predicate = "-i retiolum -p udp --dport 8302"; 48 target = "ACCEPT"; 49 } 50 { 51 predicate = "-i retiolum -p tcp --dport 8400"; 52 target = "ACCEPT"; 53 } 54 { 55 predicate = "-i retiolum -p tcp --dport 8500"; 56 target = "ACCEPT"; 57 } 58 { 59 predicate = "-i retiolum -p tcp --dport 8600"; 60 target = "ACCEPT"; 61 } 62 { 63 predicate = "-i retiolum -p udp --dport 8500"; 64 target = "ACCEPT"; 65 } 66 ]; 67}