diff options
Diffstat (limited to 'nixos/modules/services/monitoring/zabbix-proxy.nix')
-rw-r--r-- | nixos/modules/services/monitoring/zabbix-proxy.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/zabbix-proxy.nix b/nixos/modules/services/monitoring/zabbix-proxy.nix index b5009f47f175c..0ebd7bcff8343 100644 --- a/nixos/modules/services/monitoring/zabbix-proxy.nix +++ b/nixos/modules/services/monitoring/zabbix-proxy.nix @@ -1,7 +1,8 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: let cfg = config.services.zabbixProxy; + opt = options.services.zabbixProxy; pgsql = config.services.postgresql; mysql = config.services.mysql; @@ -103,6 +104,11 @@ in port = mkOption { type = types.int; default = if cfg.database.type == "mysql" then mysql.port else pgsql.port; + defaultText = literalExpression '' + if config.${opt.database.type} == "mysql" + then config.${options.services.mysql.port} + else config.${options.services.postgresql.port} + ''; description = "Database host port."; }; |