summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-02-28 07:37:01 -0500
committerAndrew Cady <d@cryptonomic.net>2021-02-28 07:37:01 -0500
commitda4c955eeb534c799b1a7378dc4d5dfaad2d21c2 (patch)
tree54aaa722a1925501c9b6dd129c6c342c70a497ad /src
parent4ae45ba0bdc988499e8fd71984b4a0ba65080d81 (diff)
config option "unit-files:" for systemd unit files
Diffstat (limited to 'src')
-rw-r--r--src/ConfigFile.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ConfigFile.hs b/src/ConfigFile.hs
index a5b5989..d7fe60d 100644
--- a/src/ConfigFile.hs
+++ b/src/ConfigFile.hs
@@ -56,6 +56,7 @@ data DiskImageConfig = DiskImageConfig {
56, packages :: Set Package 56, packages :: Set Package
57, debconfConfig :: Maybe FilePath 57, debconfConfig :: Maybe FilePath
58, unpackOnly :: Bool 58, unpackOnly :: Bool
59, unitFiles :: Vector Text
59, binaries :: Vector Text 60, binaries :: Vector Text
60, optionalBinaries :: Vector Text 61, optionalBinaries :: Vector Text
61, chrootCommands :: Vector Text 62, chrootCommands :: Vector Text
@@ -75,6 +76,7 @@ diskImageConfigParser = object $
75 <*> (Set.fromList . toList . fmap parsePackageName <$> defaultField "packages" Vector.empty (array string)) 76 <*> (Set.fromList . toList . fmap parsePackageName <$> defaultField "packages" Vector.empty (array string))
76 <*> (fmap unpack <$> optField "debconf" string) 77 <*> (fmap unpack <$> optField "debconf" string)
77 <*> defaultField "unpack-only" False bool 78 <*> defaultField "unpack-only" False bool
79 <*> defaultField "unit-files" Vector.empty (array string)
78 <*> defaultField "binaries" Vector.empty (array string) 80 <*> defaultField "binaries" Vector.empty (array string)
79 <*> defaultField "binaries-optional" Vector.empty (array string) 81 <*> defaultField "binaries-optional" Vector.empty (array string)
80 <*> defaultField "chroot-commands" Vector.empty (array string) 82 <*> defaultField "chroot-commands" Vector.empty (array string)
@@ -84,7 +86,7 @@ diskImageConfigParser = object $
84 <*> defaultField "apt-update" False bool 86 <*> defaultField "apt-update" False bool
85 87
86convSeeded :: DiskImageConfig -> DiskImageConfig 88convSeeded :: DiskImageConfig -> DiskImageConfig
87convSeeded x@(DiskImageConfig (ParentImageConfigFile f) _ _ _ _ _ _ _ _ (Just size) _) = x { initialImage = SeededImage size f } 89convSeeded x@(DiskImageConfig (ParentImageConfigFile f) _ _ _ _ _ _ _ _ _ (Just size) _) = x { initialImage = SeededImage size f }
88convSeeded x = x 90convSeeded x = x
89 91
90readCfg :: FilePath -> Action DiskImageConfig 92readCfg :: FilePath -> Action DiskImageConfig