diff --git a/nixos/modules/services/monitoring/zabbix-agent.nix b/nixos/modules/services/monitoring/zabbix-agent.nix index 481298f763a4..a943075be0c4 100644 --- a/nixos/modules/services/monitoring/zabbix-agent.nix +++ b/nixos/modules/services/monitoring/zabbix-agent.nix @@ -67,11 +67,11 @@ in config = mkIf cfg.enable { - users.extraUsers = singleton + users.extraUsers = mkIf (!config.services.zabbixServer.enable) (singleton { name = "zabbix"; uid = config.ids.uids.zabbix; description = "Zabbix daemon user"; - }; + }); systemd.services."zabbix-agent" = { description = "Zabbix Agent";