anchor.diff:  with pkgs.lib;
   
   let
  +
  +  cfg = config.services.zabbixServer;
   
     stateDir = "/var/run/zabbix";
   
  
positive.code:   
        PidFile = ${pidFile}
  
        DBName = zabbix
  
        DBUser = zabbix
      '';
  
  in
  
negative.code:       '';
      };
  
      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 cfg.enable {
  
      services.postgresql.enable = true;
  
  