Initial checkin.

Change-Id: Ib0f503f39cedb6fcc11f80a3b309e4cbb7ed438f
diff --git a/src/Mulkup/Config.hs b/src/Mulkup/Config.hs
new file mode 100644
index 0000000..f3d9fee
--- /dev/null
+++ b/src/Mulkup/Config.hs
@@ -0,0 +1,44 @@
+{-# LANGUAGE UndecidableInstances #-}
+
+module Mulkup.Config (TierConfig (..), MulkupConfig (..), readConfig) where
+
+import Dhall
+import Mulkup.Prelude
+import Optics.TH
+
+--- TierConfig ---
+
+data TierConfig = TierConfig {keep :: Natural}
+  deriving stock (Generic, Show)
+  deriving anyclass (FromDhall)
+
+makeFieldLabelsNoPrefix ''TierConfig
+
+--- TierConfigs ---
+
+data TierConfigs = TierConfigs {hourly :: TierConfig, daily :: TierConfig, weekly :: TierConfig, monthly :: TierConfig}
+  deriving stock (Generic, Show)
+  deriving anyclass (FromDhall)
+
+makeFieldLabelsNoPrefix ''TierConfigs
+
+--- StashConfigs ---
+
+data StashConfig = StashConfig {name :: Text, baseDir :: Text, tiers :: TierConfigs, exclusions :: [Text]}
+  deriving stock (Generic, Show)
+  deriving anyclass (FromDhall)
+
+makeFieldLabelsNoPrefix ''StashConfig
+
+--- MulkupConfig ---
+
+data MulkupConfig = MulkupConfig {host :: Text, stashes :: [StashConfig]}
+  deriving stock (Generic, Show)
+  deriving anyclass (FromDhall)
+
+makeFieldLabelsNoPrefix ''MulkupConfig
+
+--- readConfig ---
+
+readConfig :: Text -> IO MulkupConfig
+readConfig = Dhall.input auto