refactor
diff --git a/heka/server.sls b/heka/server.sls
index 367d883..88e40cf 100644
--- a/heka/server.sls
+++ b/heka/server.sls
@@ -30,7 +30,23 @@
     - pkg: heka_packages
 
 {%- for chain in [ "input","output","decoder","encoder","filter","splitter" ] %}
+{%- for name,values in server.input.iteritems() %}
 
+/etc/heka/conf.d/100-{{ chain }}-{{ name }}-{{ values['engine'] }}.toml:
+  file.managed:
+  - source: salt://heka/files/{{ chain }}/{{ values['engine'] }}.toml
+  - template: jinja
+  - mode: 640
+  - group: heka
+  - require:
+    - file: /etc/heka/conf.d/00-hekad.toml
+  - watch_in:
+    - service: heka_service
+  - defaults:
+      name: {{ name }}
+      values: {{ values }}
+ 
+{%- endfor %}
 {%- endfor %}
 
 {%- for name,values in server.input.iteritems() %}