summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Omni/Deploy/Manifest.hs25
1 files changed, 7 insertions, 18 deletions
diff --git a/Omni/Deploy/Manifest.hs b/Omni/Deploy/Manifest.hs
index 13dd47a..e0d0b78 100644
--- a/Omni/Deploy/Manifest.hs
+++ b/Omni/Deploy/Manifest.hs
@@ -71,9 +71,7 @@ instance Aeson.FromJSON Artifact where
parseJSON =
Aeson.withObject "Artifact" <| \o ->
Artifact
- </ o
- .:? "type"
- .!= "nix-closure"
+ </ (o .:? "type" .!= "nix-closure")
<*> o
.: "storePath"
@@ -95,8 +93,7 @@ instance Aeson.FromJSON Exec where
parseJSON =
Aeson.withObject "Exec" <| \o ->
Exec
- </ o
- .:? "command"
+ </ (o .:? "command")
<*> o
.:? "user"
.!= "root"
@@ -126,8 +123,7 @@ instance Aeson.FromJSON Http where
parseJSON =
Aeson.withObject "Http" <| \o ->
Http
- </ o
- .: "domain"
+ </ (o .: "domain")
<*> o
.:? "path"
.!= "/"
@@ -154,9 +150,7 @@ instance Aeson.FromJSON Systemd where
parseJSON =
Aeson.withObject "Systemd" <| \o ->
Systemd
- </ o
- .:? "after"
- .!= ["network-online.target"]
+ </ (o .:? "after" .!= ["network-online.target"])
<*> o
.:? "requires"
.!= []
@@ -191,9 +185,7 @@ instance Aeson.FromJSON Hardening where
parseJSON =
Aeson.withObject "Hardening" <| \o ->
Hardening
- </ o
- .:? "dynamicUser"
- .!= False
+ </ (o .:? "dynamicUser" .!= False)
<*> o
.:? "privateTmp"
.!= True
@@ -234,8 +226,7 @@ instance Aeson.FromJSON Service where
parseJSON =
Aeson.withObject "Service" <| \o ->
Service
- </ o
- .: "name"
+ </ (o .: "name")
<*> o
.: "artifact"
<*> o
@@ -286,9 +277,7 @@ instance Aeson.FromJSON Manifest where
parseJSON =
Aeson.withObject "Manifest" <| \o ->
Manifest
- </ o
- .:? "version"
- .!= 1
+ </ (o .:? "version" .!= 1)
<*> o
.: "generation"
<*> o