summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Apt.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/Apt.hs')
-rw-r--r--src/Propellor/Property/Apt.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index 70b9474e..29f453a9 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -33,6 +33,11 @@ getHostMirror = do
getHostMirrorInfo :: Propellor (Maybe HostMirror)
getHostMirrorInfo = fromInfoVal <$> askInfo
+withHostMirror :: Desc -> (Url -> Property DebianLike) -> Property DebianLike
+withHostMirror desc mkp = property' desc $ \w -> do
+ u <- getHostMirror
+ ensureProperty w (mkp u)
+
sourcesList :: FilePath
sourcesList = "/etc/apt/sources.list"