lol
0
fork

Configure Feed

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

nixos/bird-lg: Accept multiple listen addresses

e1mo 408c17ab e310400c

+17 -6
+17 -6
nixos/modules/services/networking/bird-lg.nix
··· 16 16 { 17 17 "--servers" = lib.concatStringsSep "," fe.servers; 18 18 "--domain" = fe.domain; 19 - "--listen" = fe.listenAddress; 19 + "--listen" = stringOrConcat "," fe.listenAddresses; 20 20 "--proxy-port" = fe.proxyPort; 21 21 "--whois" = fe.whois; 22 22 "--dns-interface" = fe.dnsInterface; ··· 37 37 { 38 38 "--allowed" = lib.concatStringsSep "," px.allowedIPs; 39 39 "--bird" = px.birdSocket; 40 - "--listen" = px.listenAddress; 40 + "--listen" = stringOrConcat "," px.listenAddresses; 41 41 "--traceroute_bin" = px.traceroute.binary; 42 42 "--traceroute_flags" = lib.concatStringsSep " " px.traceroute.flags; 43 43 "--traceroute_raw" = px.traceroute.rawOutput; ··· 58 58 args: lib.mapAttrsToList (name: value: "${name} " + mkArgValue value) (filterNull args); 59 59 in 60 60 { 61 + imports = [ 62 + (lib.mkRenamedOptionModule 63 + [ "services" "bird-lg" "frontend" "listenAddress" ] 64 + [ "services" "bird-lg" "frontend" "listenAddresses" ] 65 + ) 66 + (lib.mkRenamedOptionModule 67 + [ "services" "bird-lg" "proxy" "listenAddress" ] 68 + [ "services" "bird-lg" "proxy" "listenAddresses" ] 69 + ) 70 + ]; 71 + 61 72 options = { 62 73 services.bird-lg = { 63 74 package = lib.mkPackageOption pkgs "bird-lg" { }; ··· 77 88 frontend = { 78 89 enable = lib.mkEnableOption "Bird Looking Glass Frontend Webserver"; 79 90 80 - listenAddress = lib.mkOption { 81 - type = lib.types.str; 91 + listenAddresses = lib.mkOption { 92 + type = with lib.types; either str (listOf str); 82 93 default = "127.0.0.1:5000"; 83 94 description = "Address to listen on."; 84 95 }; ··· 202 213 proxy = { 203 214 enable = lib.mkEnableOption "Bird Looking Glass Proxy"; 204 215 205 - listenAddress = lib.mkOption { 206 - type = lib.types.str; 216 + listenAddresses = lib.mkOption { 217 + type = with lib.types; either str (listOf str); 207 218 default = "127.0.0.1:8000"; 208 219 description = "Address to listen on."; 209 220 };