diff options
-rw-r--r-- | dhall/Config.dhall | 10 | ||||
-rw-r--r-- | dhall/Vault.dhall | 2 | ||||
-rw-r--r-- | dhall/environment/Environment.dhall | 1 | ||||
-rw-r--r-- | dhall/mkConfig.dhall | 69 | ||||
-rw-r--r-- | dhall/types.dhall | 10 |
5 files changed, 36 insertions, 56 deletions
diff --git a/dhall/Config.dhall b/dhall/Config.dhall index db063b7..c095403 100644 --- a/dhall/Config.dhall +++ b/dhall/Config.dhall | |||
@@ -10,17 +10,17 @@ in λ(Environment : Type) | |||
10 | , clever_token : | 10 | , clever_token : |
11 | Text | 11 | Text |
12 | , clever_syslog_server : | 12 | , clever_syslog_server : |
13 | Text | 13 | Optional Text |
14 | , clever_domain : | 14 | , clever_domain : |
15 | Text | 15 | Optional Text |
16 | , clever_app_tasks_file : | 16 | , clever_app_tasks_file : |
17 | Text | 17 | Optional Text |
18 | , clever_haskell_entry_point : | 18 | , clever_haskell_entry_point : |
19 | Text | 19 | Optional Text |
20 | , clever_metrics : | 20 | , clever_metrics : |
21 | Bool | 21 | Bool |
22 | , clever_addons : | 22 | , clever_addons : |
23 | List Addon | 23 | List Addon |
24 | , clever_env : | 24 | , clever_env : |
25 | Environment | 25 | Environment |
26 | } \ No newline at end of file | 26 | } |
diff --git a/dhall/Vault.dhall b/dhall/Vault.dhall index ba1a309..b2a45cc 100644 --- a/dhall/Vault.dhall +++ b/dhall/Vault.dhall | |||
@@ -1 +1 @@ | |||
{ organization : Text, secret : Text, token : Text } | { token : Text, secret : Text, sshKey : Text } | ||
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 @@ | |||
1 | { FORCE_HTTPS : Bool } | ||
diff --git a/dhall/mkConfig.dhall b/dhall/mkConfig.dhall index cf64bef..413ea5a 100644 --- a/dhall/mkConfig.dhall +++ b/dhall/mkConfig.dhall | |||
@@ -1,44 +1,33 @@ | |||
1 | let Config = ./Config.dhall | 1 | let Config = ./Config.dhall |
2 | 2 | ||
3 | in let Vault = ./Vault.dhall | 3 | let Vault = ./Vault.dhall |
4 | 4 | ||
5 | in let Addon = ./addon/Addon.dhall | 5 | let Addon = ./addon/Addon.dhall |
6 | 6 | ||
7 | in let Environment = ./environment/Environment.dhall | 7 | in λ(vault : Vault) |
8 | 8 | → λ(app : Text) | |
9 | in let nonifyEmpty = | 9 | → λ(organization : Text) |
10 | λ(opt : Optional Text) | 10 | → { clever_app = |
11 | → Optional/fold Text opt Text (λ(x : Text) → x) "None" | 11 | app |
12 | 12 | , clever_orga = | |
13 | in λ(vault : Vault) | 13 | organization |
14 | → λ(app : Text) | 14 | , clever_secret = |
15 | → λ(entryPoint : Optional Text) | 15 | vault.secret |
16 | → λ(metrics : Bool) | 16 | , clever_token = |
17 | → λ(syslogServer : Optional Text) | 17 | vault.token |
18 | → λ(domain : Optional Text) | 18 | , clever_syslog_server = |
19 | → λ(tasksFile : Optional Text) | 19 | None Text |
20 | → λ(addons : List Addon) | 20 | , clever_domain = |
21 | → { clever_app = | 21 | None Text |
22 | app | 22 | , clever_app_tasks_file = |
23 | , clever_orga = | 23 | None Text |
24 | vault.organization | 24 | , clever_haskell_entry_point = |
25 | , clever_secret = | 25 | None Text |
26 | vault.secret | 26 | , clever_metrics = |
27 | , clever_token = | 27 | True |
28 | vault.token | 28 | , clever_addons = |
29 | , clever_syslog_server = | 29 | [] : List Addon |
30 | nonifyEmpty syslogServer | 30 | , clever_env = |
31 | , clever_domain = | 31 | {=} |
32 | nonifyEmpty domain | 32 | } |
33 | , clever_app_tasks_file = | 33 | : Config {} |
34 | nonifyEmpty tasksFile | ||
35 | , clever_haskell_entry_point = | ||
36 | nonifyEmpty entryPoint | ||
37 | , clever_metrics = | ||
38 | metrics | ||
39 | , clever_addons = | ||
40 | addons | ||
41 | , clever_env = | ||
42 | { FORCE_HTTPS = True } | ||
43 | } | ||
44 | : Config Environment \ No newline at end of file | ||
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 @@ | |||
1 | { Vault = | { Vault = ./Vault.dhall, Addon = ./addon/Addon.dhall, Config = ./Config.dhall } | |
2 | ./Vault.dhall | ||
3 | , Addon = | ||
4 | ./addon/Addon.dhall | ||
5 | , Environment = | ||
6 | ./environment/Environment.dhall | ||
7 | , Config = | ||
8 | ./Config.dhall | ||
9 | } | ||