Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Mic92
Created July 21, 2019 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mic92/f708dffee37a6afcab7501fdb5237109 to your computer and use it in GitHub Desktop.
Save Mic92/f708dffee37a6afcab7501fdb5237109 to your computer and use it in GitHub Desktop.
{ lib, ... }:
with lib;
{
options.services.nginx.virtualHosts = mkOption {
type = types.attrsOf (types.submodule {
listen = mkOption {
type = with types; listOf (submodule {});
default = [
{ addr = "127.0.0.1"; port = 443; ssl = true;}
{ addr = "127.0.0.1"; port = 80; }
];
};
});
};
config = {
services.sslh = {
enable = true;
transparent = true;
defaultAppendConfig = ''
protocols:
(
{ name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; probe: "builtin"; },
{ name: "xmpp"; host: "localhost"; port: "5222"; probe: "builtin"; },
{ name: "ssl"; host: "localhost"; port: "443"; probe: "builtin"; },
{ name: "tinc"; host: "localhost"; port: "655"; probe: "builtin"; }
);
'';
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment