prosody service: add types
This commit is contained in:
parent
36995b788e
commit
1e45a6459e
|
@ -12,13 +12,13 @@ let
|
||||||
|
|
||||||
# TODO: require attribute
|
# TODO: require attribute
|
||||||
key = mkOption {
|
key = mkOption {
|
||||||
type = types.str;
|
type = types.path;
|
||||||
description = "Path to the key file";
|
description = "Path to the key file";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: require attribute
|
# TODO: require attribute
|
||||||
cert = mkOption {
|
cert = mkOption {
|
||||||
type = types.str;
|
type = types.path;
|
||||||
description = "Path to the certificate file";
|
description = "Path to the certificate file";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -27,71 +27,85 @@ let
|
||||||
moduleOpts = {
|
moduleOpts = {
|
||||||
|
|
||||||
roster = mkOption {
|
roster = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Allow users to have a roster";
|
description = "Allow users to have a roster";
|
||||||
};
|
};
|
||||||
|
|
||||||
saslauth = mkOption {
|
saslauth = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Authentication for clients and servers. Recommended if you want to log in.";
|
description = "Authentication for clients and servers. Recommended if you want to log in.";
|
||||||
};
|
};
|
||||||
|
|
||||||
tls = mkOption {
|
tls = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Add support for secure TLS on c2s/s2s connections";
|
description = "Add support for secure TLS on c2s/s2s connections";
|
||||||
};
|
};
|
||||||
|
|
||||||
dialback = mkOption {
|
dialback = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "s2s dialback support";
|
description = "s2s dialback support";
|
||||||
};
|
};
|
||||||
|
|
||||||
disco = mkOption {
|
disco = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Service discovery";
|
description = "Service discovery";
|
||||||
};
|
};
|
||||||
|
|
||||||
legacyauth = mkOption {
|
legacyauth = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Legacy authentication. Only used by some old clients and bots";
|
description = "Legacy authentication. Only used by some old clients and bots";
|
||||||
};
|
};
|
||||||
|
|
||||||
version = mkOption {
|
version = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Replies to server version requests";
|
description = "Replies to server version requests";
|
||||||
};
|
};
|
||||||
|
|
||||||
uptime = mkOption {
|
uptime = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Report how long server has been running";
|
description = "Report how long server has been running";
|
||||||
};
|
};
|
||||||
|
|
||||||
time = mkOption {
|
time = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Let others know the time here on this server";
|
description = "Let others know the time here on this server";
|
||||||
};
|
};
|
||||||
|
|
||||||
ping = mkOption {
|
ping = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Replies to XMPP pings with pongs";
|
description = "Replies to XMPP pings with pongs";
|
||||||
};
|
};
|
||||||
|
|
||||||
console = mkOption {
|
console = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "telnet to port 5582";
|
description = "telnet to port 5582";
|
||||||
};
|
};
|
||||||
|
|
||||||
bosh = mkOption {
|
bosh = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable BOSH clients, aka 'Jabber over HTTP'";
|
description = "Enable BOSH clients, aka 'Jabber over HTTP'";
|
||||||
};
|
};
|
||||||
|
|
||||||
httpserver = mkOption {
|
httpserver = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Serve static files from a directory over HTTP";
|
description = "Serve static files from a directory over HTTP";
|
||||||
};
|
};
|
||||||
|
|
||||||
websocket = mkOption {
|
websocket = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable WebSocket support";
|
description = "Enable WebSocket support";
|
||||||
};
|
};
|
||||||
|
@ -114,18 +128,20 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
enabled = mkOption {
|
enabled = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the virtual host";
|
description = "Whether to enable the virtual host";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssl = mkOption {
|
ssl = mkOption {
|
||||||
description = "Paths to SSL files";
|
type = types.nullOr (types.submodule sslOpts);
|
||||||
default = null;
|
default = null;
|
||||||
options = [ sslOpts ];
|
description = "Paths to SSL files";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
default = '''';
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
description = "Additional virtual host specific configuration";
|
description = "Additional virtual host specific configuration";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -144,11 +160,13 @@ in
|
||||||
services.prosody = {
|
services.prosody = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the prosody server";
|
description = "Whether to enable the prosody server";
|
||||||
};
|
};
|
||||||
|
|
||||||
allowRegistration = mkOption {
|
allowRegistration = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Allow account creation";
|
description = "Allow account creation";
|
||||||
};
|
};
|
||||||
|
@ -156,8 +174,9 @@ in
|
||||||
modules = moduleOpts;
|
modules = moduleOpts;
|
||||||
|
|
||||||
extraModules = mkOption {
|
extraModules = mkOption {
|
||||||
description = "Enable custom modules";
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
description = "Enable custom modules";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts = mkOption {
|
virtualHosts = mkOption {
|
||||||
|
@ -183,20 +202,21 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
ssl = mkOption {
|
ssl = mkOption {
|
||||||
description = "Paths to SSL files";
|
type = types.nullOr (types.submodule sslOpts);
|
||||||
default = null;
|
default = null;
|
||||||
options = [ sslOpts ];
|
description = "Paths to SSL files";
|
||||||
};
|
};
|
||||||
|
|
||||||
admins = mkOption {
|
admins = mkOption {
|
||||||
description = "List of administrators of the current host";
|
type = types.listOf types.str;
|
||||||
example = [ "admin1@example.com" "admin2@example.com" ];
|
|
||||||
default = [];
|
default = [];
|
||||||
|
example = [ "admin1@example.com" "admin2@example.com" ];
|
||||||
|
description = "List of administrators of the current host";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = '''';
|
default = "";
|
||||||
description = "Additional prosody configuration";
|
description = "Additional prosody configuration";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue