diff options
Diffstat (limited to 'src/Propellor/Property')
| -rw-r--r-- | src/Propellor/Property/Schroot.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Propellor/Property/Schroot.hs b/src/Propellor/Property/Schroot.hs index c53ce4f1..0e683562 100644 --- a/src/Propellor/Property/Schroot.hs +++ b/src/Propellor/Property/Schroot.hs @@ -3,11 +3,27 @@ module Propellor.Property.Schroot where import Propellor.Base +import Propellor.Types.Info import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import Utility.FileMode +data UseOverlays = UseOverlays deriving (Eq, Show) + +-- | Indicate that a schroots on a host should use @union-type=overlay@ +-- +-- Setting this property does not actually ensure that the line +-- @union-type=overlay@ is present in any schroot config files. See +-- 'Propellor.Property.Sbuild.built' for example usage. +useOverlays :: Property (HasInfo + UnixLike) +useOverlays = pureInfoProperty "use schroot overlays" (InfoVal UseOverlays) + +-- | Gets whether a host uses overlays. +usesOverlays :: Propellor Bool +usesOverlays = isJust . fromInfoVal + <$> (askInfo :: Propellor (InfoVal UseOverlays)) + -- | Configure schroot such that all schroots with @union-type=overlay@ in their -- configuration will run their overlays in a tmpfs. -- |
