From a8c060229d00306720778c05fe5f53319a8de762 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Mon, 1 Jul 2019 15:46:31 +0200 Subject: Remove default environment from Dhall config --- dhall/environment/Environment.dhall | 1 - dhall/mkConfig.dhall | 84 ++++++++++++++++++------------------- dhall/types.dhall | 10 +---- 3 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 dhall/environment/Environment.dhall (limited to 'dhall') diff --git a/dhall/environment/Environment.dhall b/dhall/environment/Environment.dhall deleted file mode 100644 index 68514c9..0000000 --- a/dhall/environment/Environment.dhall +++ /dev/null @@ -1 +0,0 @@ -{ FORCE_HTTPS : Bool } diff --git a/dhall/mkConfig.dhall b/dhall/mkConfig.dhall index bd382de..37b029a 100644 --- a/dhall/mkConfig.dhall +++ b/dhall/mkConfig.dhall @@ -1,45 +1,43 @@ let Config = ./Config.dhall -in let Vault = ./Vault.dhall - - in let Addon = ./addon/Addon.dhall - - in let Environment = ./environment/Environment.dhall - - in let nonifyEmpty = - λ(opt : Optional Text) - → Optional/fold Text opt Text (λ(x : Text) → x) "None" - - in λ(vault : Vault) - → λ(app : Text) - → λ(organization : Text) - → λ(entryPoint : Optional Text) - → λ(metrics : Bool) - → λ(syslogServer : Optional Text) - → λ(domain : Optional Text) - → λ(tasksFile : Optional Text) - → λ(addons : List Addon) - → { clever_app = - app - , clever_orga = - organization - , clever_secret = - vault.secret - , clever_token = - vault.token - , clever_syslog_server = - nonifyEmpty syslogServer - , clever_domain = - nonifyEmpty domain - , clever_app_tasks_file = - nonifyEmpty tasksFile - , clever_haskell_entry_point = - nonifyEmpty entryPoint - , clever_metrics = - metrics - , clever_addons = - addons - , clever_env = - { FORCE_HTTPS = True } - } - : Config Environment +let Vault = ./Vault.dhall + +let Addon = ./addon/Addon.dhall + +let nonifyEmpty = + λ(opt : Optional Text) + → Optional/fold Text opt Text (λ(x : Text) → x) "None" + +in λ(vault : Vault) + → λ(app : Text) + → λ(organization : Text) + → λ(entryPoint : Optional Text) + → λ(metrics : Bool) + → λ(syslogServer : Optional Text) + → λ(domain : Optional Text) + → λ(tasksFile : Optional Text) + → λ(addons : List Addon) + → { clever_app = + app + , clever_orga = + organization + , clever_secret = + vault.secret + , clever_token = + vault.token + , clever_syslog_server = + nonifyEmpty syslogServer + , clever_domain = + nonifyEmpty domain + , clever_app_tasks_file = + nonifyEmpty tasksFile + , clever_haskell_entry_point = + nonifyEmpty entryPoint + , clever_metrics = + metrics + , clever_addons = + addons + , clever_env = + {=} + } + : Config {} diff --git a/dhall/types.dhall b/dhall/types.dhall index 5e6a81c..ab153d2 100644 --- a/dhall/types.dhall +++ b/dhall/types.dhall @@ -1,9 +1 @@ -{ Vault = - ./Vault.dhall -, Addon = - ./addon/Addon.dhall -, Environment = - ./environment/Environment.dhall -, Config = - ./Config.dhall -} +{ Vault = ./Vault.dhall, Addon = ./addon/Addon.dhall, Config = ./Config.dhall } -- cgit v1.2.3