nixos/sslh: make it possible (and the default) to listen on ipv6
This commit is contained in:
parent
467ce5a9f4
commit
433f227f70
@ -15,7 +15,11 @@ let
|
|||||||
|
|
||||||
listen:
|
listen:
|
||||||
(
|
(
|
||||||
{ host: "${cfg.listenAddress}"; port: "${toString cfg.port}"; }
|
${
|
||||||
|
concatMapStringsSep ",\n"
|
||||||
|
(addr: ''{ host: "${addr}"; port: "${toString cfg.port}"; }'')
|
||||||
|
cfg.listenAddresses
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
${cfg.appendConfig}
|
${cfg.appendConfig}
|
||||||
@ -33,6 +37,10 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule [ "services" "sslh" "listenAddress" ] [ "services" "sslh" "listenAddresses" ])
|
||||||
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.sslh = {
|
services.sslh = {
|
||||||
enable = mkEnableOption "sslh";
|
enable = mkEnableOption "sslh";
|
||||||
@ -55,10 +63,10 @@ in
|
|||||||
description = "Will the services behind sslh (Apache, sshd and so on) see the external IP and ports as if the external world connected directly to them";
|
description = "Will the services behind sslh (Apache, sshd and so on) see the external IP and ports as if the external world connected directly to them";
|
||||||
};
|
};
|
||||||
|
|
||||||
listenAddress = mkOption {
|
listenAddresses = mkOption {
|
||||||
type = types.str;
|
type = types.coercedTo types.str singleton (types.listOf types.str);
|
||||||
default = "0.0.0.0";
|
default = [ "0.0.0.0" "[::]" ];
|
||||||
description = "Listening address or hostname.";
|
description = "Listening addresses or hostnames.";
|
||||||
};
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user