From 9c719f4f5e8b5bfdc0be3259cd3a30b02a345e82 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Jul 2017 15:21:48 -0400 Subject: propellor spin --- joeyconfig.hs | 12 ++++++++++++ src/Propellor/Property/DiskImage/PartSpec.hs | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/joeyconfig.hs b/joeyconfig.hs index b9b280e9..a6d913ef 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -4,6 +4,8 @@ module Main where import Propellor import Propellor.Property.Scheduled +import Propellor.Property.DiskImage +import Propellor.Property.Chroot import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Network as Network @@ -92,6 +94,16 @@ darkstar = host "darkstar.kitenet.net" $ props & Ssh.userKeys (User "joey") hostContext [ (SshRsa, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1YoyHxZwG5Eg0yiMTJLSWJ/+dMM6zZkZiR4JJ0iUfP+tT2bm/lxYompbSqBeiCq+PYcSC67mALxp1vfmdOV//LWlbXfotpxtyxbdTcQbHhdz4num9rJQz1tjsOsxTEheX5jKirFNC5OiKhqwIuNydKWDS9qHGqsKcZQ8p+n1g9Lr3nJVGY7eRRXzw/HopTpwmGmAmb9IXY6DC2k91KReRZAlOrk0287LaK3eCe1z0bu7LYzqqS+w99iXZ/Qs0m9OqAPnHZjWQQ0fN4xn5JQpZSJ7sqO38TBAimM+IHPmy2FTNVVn9zGM+vN1O2xr3l796QmaUG1+XLL0shfR/OZbb joey@darkstar") ] + & imageBuilt "/srv/test.img" mychroot MSDOS + [ partition EXT2 `mountedAt` "/boot" + , partition EXT4 `mountedAt` "/" + , swapPartition (MegaBytes 256) + ] + where + mychroot d = debootstrapped mempty d $ props + & osDebian Unstable X86_64 + & Apt.installed ["linux-image-amd64"] + & Grub.installed PC gnu :: Host gnu = host "gnu.kitenet.net" $ props diff --git a/src/Propellor/Property/DiskImage/PartSpec.hs b/src/Propellor/Property/DiskImage/PartSpec.hs index 6a29af4e..55249889 100644 --- a/src/Propellor/Property/DiskImage/PartSpec.hs +++ b/src/Propellor/Property/DiskImage/PartSpec.hs @@ -8,11 +8,15 @@ module Propellor.Property.DiskImage.PartSpec ( module Propellor.Types.PartSpec, module Propellor.Property.DiskImage.PartSpec, + module Propellor.Property.Parted.Types, + module Propellor.Property.Partition, ) where import Propellor.Base import Propellor.Property.Parted import Propellor.Types.PartSpec +import Propellor.Property.Parted.Types +import Propellor.Property.Partition (Fs(..)) -- | Adds additional free space to the partition. addFreeSpace :: PartSpec t -> PartSize -> PartSpec t -- cgit v1.2.3