-# If an env.local file exists load it, otherwise load an env file for the
-# current hostname (first part before a dot) if it exists.
-host=${$(hostname)//.*/}
-if [[ -f ~/.zsh/env.local ]]; then;
- source ~/.zsh/env.local
-elif [[ -f ~/.zsh/env.$host ]]; then;
- source ~/.zsh/env.$host
-fi
+
+# Load global env file for current hostname (first part before a dot) or
+# global env.local.
+source_config ~/.shell "" env $host
+
+# Load rc file for current OS.
+source_config ~/.zsh os env $(uname) nolocal
+# Load env file for current hostname (first part before a dot) or env.local.
+source_config ~/.zsh host env $host
+
+source_debug "finished sourcing ~/.zsh/env"
+
+# vim: ft=zsh