Author: eelco
Date: Fri Nov 26 22:50:57 2010
New Revision: 24888
URL: https://svn.nixos.org/websvn/nix/?rev=24888&sc=1
Log:
* Make the location of the database configurable.
Modified:
nixos/trunk/modules/services/monitoring/zabbix-server.nix
Modified: nixos/trunk/modules/services/monitoring/zabbix-server.nix
==============================================================================
--- nixos/trunk/modules/services/monitoring/zabbix-server.nix Fri Nov 26
22:50:23 2010 (r24887)
+++ nixos/trunk/modules/services/monitoring/zabbix-server.nix Fri Nov 26
22:50:57 2010 (r24888)
@@ -5,6 +5,8 @@
let
+ cfg = config.services.zabbixServer;
+
stateDir = "/var/run/zabbix";
logDir = "/var/log/zabbix";
@@ -19,9 +21,15 @@
PidFile = ${pidFile}
+ DBHost = ${cfg.dbServer}
+
DBName = zabbix
DBUser = zabbix
+
+ ${optionalString (cfg.dbPassword != "") ''
+ DBPassword = ${cfg.dbPassword}
+ ''}
'';
in
@@ -39,11 +47,21 @@
'';
};
+ services.zabbixServer.dbServer = mkOption {
+ default = "localhost";
+ description = "Hostname or IP address of the database server.";
+ };
+
+ services.zabbixServer.dbPassword = mkOption {
+ default = "";
+ description = "Password used to connect to the database server.";
+ };
+
};
###### implementation
- config = mkIf config.services.zabbixServer.enable {
+ config = mkIf cfg.enable {
services.postgresql.enable = true;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits