define service {
${builtins.concatStringsSep "\n" (mapAttrsToList (k: v:
" ${pad 30 k} ${toStr k v}"
- ) service)}
+ ) (filterAttrs (k: v: ! builtins.elem k ["passiveInfo" "filter"]) service))}
}
'';
toServices = services: builtins.concatStringsSep "\n" (map toService services);
then toCommands v
else if keyname == "templates"
then toTemplates v
- else if builtins.elem keyname ["host" "contactgroup" "contact" "timeperiod"]
+ else if builtins.elem keyname ["hostgroup" "host" "contactgroup" "contact" "timeperiod" "servicegroup"]
then toOthers keyname v
else "";
toObjects = v: builtins.concatStringsSep "\n" (mapAttrsToList toObjects' v);