|
61 | 61 | # HTTP Connector |
62 | 62 | server.http.enabled=${lib.boolToString cfg.http.enable} |
63 | 63 | server.http.listen_address=${cfg.http.listenAddress} |
64 | | - server.http.advertised_address=${cfg.http.listenAddress} |
| 64 | + server.http.advertised_address=${cfg.http.advertisedAddress} |
65 | 65 |
|
66 | 66 | # HTTPS Connector |
67 | 67 | server.https.enabled=${lib.boolToString cfg.https.enable} |
68 | 68 | server.https.listen_address=${cfg.https.listenAddress} |
69 | | - server.https.advertised_address=${cfg.https.listenAddress} |
| 69 | + server.https.advertised_address=${cfg.https.advertisedAddress} |
70 | 70 |
|
71 | 71 | # BOLT Connector |
72 | 72 | server.bolt.enabled=${lib.boolToString cfg.bolt.enable} |
73 | 73 | server.bolt.listen_address=${cfg.bolt.listenAddress} |
74 | | - server.bolt.advertised_address=${cfg.bolt.listenAddress} |
| 74 | + server.bolt.advertised_address=${cfg.bolt.advertisedAddress} |
75 | 75 | server.bolt.tls_level=${cfg.bolt.tlsLevel} |
76 | 76 |
|
77 | 77 | # SSL Policies |
|
99 | 99 | # Extra Configuration |
100 | 100 | ${cfg.extraServerConfig} |
101 | 101 | ''; |
102 | | - |
103 | 102 | in |
104 | 103 | { |
105 | | - |
106 | 104 | imports = [ |
107 | 105 | (lib.mkRenamedOptionModule |
108 | 106 | [ "services" "neo4j" "host" ] |
|
160 | 158 | ###### interface |
161 | 159 |
|
162 | 160 | options.services.neo4j = { |
163 | | - |
164 | 161 | enable = lib.mkOption { |
165 | 162 | type = lib.types.bool; |
166 | 163 | default = false; |
|
248 | 245 | ''; |
249 | 246 | }; |
250 | 247 |
|
| 248 | + advertisedAddress = lib.mkOption { |
| 249 | + type = lib.types.str; |
| 250 | + default = cfg.bolt.listenAddress; |
| 251 | + defaultText = lib.literalExpression "config.${opt.bolt.listenAddress}"; |
| 252 | + description = '' |
| 253 | + Neo4j advertised address for BOLT traffic. The advertised address is |
| 254 | + expressed in the format `<ip-address>:<port-number>`. |
| 255 | + ''; |
| 256 | + }; |
| 257 | + |
251 | 258 | sslPolicy = lib.mkOption { |
252 | 259 | type = lib.types.str; |
253 | 260 | default = "legacy"; |
|
379 | 386 | expressed in the format `<ip-address>:<port-number>`. |
380 | 387 | ''; |
381 | 388 | }; |
| 389 | + |
| 390 | + advertisedAddress = lib.mkOption { |
| 391 | + type = lib.types.str; |
| 392 | + default = cfg.http.listenAddress; |
| 393 | + defaultText = lib.literalExpression "config.${opt.http.listenAddress}"; |
| 394 | + description = '' |
| 395 | + Neo4j advertised address for HTTP traffic. The advertised address is |
| 396 | + expressed in the format `<ip-address>:<port-number>`. |
| 397 | + ''; |
| 398 | + }; |
382 | 399 | }; |
383 | 400 |
|
384 | 401 | https = { |
|
401 | 418 | ''; |
402 | 419 | }; |
403 | 420 |
|
| 421 | + advertisedAddress = lib.mkOption { |
| 422 | + type = lib.types.str; |
| 423 | + default = cfg.https.listenAddress; |
| 424 | + defaultText = lib.literalExpression "config.${opt.https.listenAddress}"; |
| 425 | + description = '' |
| 426 | + Neo4j advertised address for HTTPS traffic. The advertised address is |
| 427 | + expressed in the format `<ip-address>:<port-number>`. |
| 428 | + ''; |
| 429 | + }; |
| 430 | + |
404 | 431 | sslPolicy = lib.mkOption { |
405 | 432 | type = lib.types.str; |
406 | 433 | default = "legacy"; |
|
440 | 467 | }: |
441 | 468 | { |
442 | 469 | options = { |
443 | | - |
444 | 470 | allowKeyGeneration = lib.mkOption { |
445 | 471 | type = lib.types.bool; |
446 | 472 | default = false; |
|
590 | 616 | default value. |
591 | 617 | ''; |
592 | 618 | }; |
593 | | - |
594 | 619 | }; |
595 | 620 |
|
596 | 621 | config.directoriesToCreate = lib.optionals ( |
597 | 622 | certDirOpt.highestPrio >= 1500 && options.baseDirectory.highestPrio >= 1500 |
598 | 623 | ) (map (opt: opt.value) (lib.filter isDefaultPathOption (lib.attrValues options))); |
599 | | - |
600 | 624 | } |
601 | 625 | ) |
602 | 626 | ); |
|
610 | 634 | for further details. |
611 | 635 | ''; |
612 | 636 | }; |
613 | | - |
614 | 637 | }; |
615 | 638 |
|
616 | 639 | ###### implementation |
|
630 | 653 | lib.attrValues cfg.ssl.policies |
631 | 654 | ); |
632 | 655 | in |
633 | | - |
634 | 656 | lib.mkIf cfg.enable { |
635 | 657 | assertions = [ |
636 | 658 | { |
|
0 commit comments