zabbix-server: add extraConfig option

add types to options
This commit is contained in:
Longrin Wischnewski
2014-11-03 16:47:07 +01:00
parent 512e33bcbd
commit ce8e1a278b
@@ -32,6 +32,8 @@ let
${optionalString (cfg.dbPassword != "") '' ${optionalString (cfg.dbPassword != "") ''
DBPassword = ${cfg.dbPassword} DBPassword = ${cfg.dbPassword}
''} ''}
${config.services.zabbixServer.extraConfig}
''; '';
useLocalPostgres = cfg.dbServer == "localhost" || cfg.dbServer == ""; useLocalPostgres = cfg.dbServer == "localhost" || cfg.dbServer == "";
@@ -46,6 +48,7 @@ in
services.zabbixServer.enable = mkOption { services.zabbixServer.enable = mkOption {
default = false; default = false;
type = types.bool;
description = '' description = ''
Whether to run the Zabbix server on this machine. Whether to run the Zabbix server on this machine.
''; '';
@@ -53,6 +56,7 @@ in
services.zabbixServer.dbServer = mkOption { services.zabbixServer.dbServer = mkOption {
default = "localhost"; default = "localhost";
type = types.str;
description = '' description = ''
Hostname or IP address of the database server. Hostname or IP address of the database server.
Use an empty string ("") to use peer authentication. Use an empty string ("") to use peer authentication.
@@ -61,9 +65,18 @@ in
services.zabbixServer.dbPassword = mkOption { services.zabbixServer.dbPassword = mkOption {
default = ""; default = "";
type = types.str;
description = "Password used to connect to the database server."; description = "Password used to connect to the database server.";
}; };
services.zabbixServer.extraConfig = mkOption {
default = "";
type = types.lines;
description = ''
Configuration that is injected verbatim into the configuration file.
'';
};
}; };
###### implementation ###### implementation