summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/PartSpec.hs
diff options
context:
space:
mode:
authorJoey Hess2017-11-19 15:21:53 -0400
committerJoey Hess2017-11-19 15:21:53 -0400
commitc7a8c812add892eb7f7b7068d258efa01095fcde (patch)
treeff9100d6847b8f8007beec8761e48e5875eae53a /src/Propellor/Types/PartSpec.hs
parent143996429e594def4c31d1346713433335758128 (diff)
partition table in Info
Diskimage.imageBuiltFor: New property to build a disk image for a Host, using partition table information configured via the new properties hasPartitionTableType, hasPartition and adjustPartition. This lets Machine properties include eg /boot partitions that are known to be needed by the bootloader, and the user can adjust those partitions and add others. This commit was sponsored by Brock Spratlen on Patreon.
Diffstat (limited to 'src/Propellor/Types/PartSpec.hs')
-rw-r--r--src/Propellor/Types/PartSpec.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Propellor/Types/PartSpec.hs b/src/Propellor/Types/PartSpec.hs
index 860b38f6..c6f9aa7a 100644
--- a/src/Propellor/Types/PartSpec.hs
+++ b/src/Propellor/Types/PartSpec.hs
@@ -6,3 +6,9 @@ import Propellor.Property.Mount
-- | Specifies a mount point, mount options, and a constructor for a
-- Partition that determines its size.
type PartSpec t = (Maybe MountPoint, MountOpts, PartSize -> Partition, t)
+
+-- | Specifies a partition table.
+data PartTableSpec = PartTableSpec TableType [PartSpec ()]
+
+instance Show PartTableSpec where
+ show (PartTableSpec tt _) = "PartTableSpec " ++ show tt