pcmt-config-schema/schema.dhall

39 lines
1.1 KiB
Haskell
Raw Normal View History

2023-05-06 01:24:31 +02:00
let Schema =
-- | define a configuration schema.
{ Type =
{ Host : Text
, Port : Natural
, AppName : Text
, LiveMode : Bool
, DevelMode : Bool
2023-05-13 21:49:50 +02:00
, Session :
{ CookieName : Text
, CookieAuthSecret : Text
, CookieEncrSecret : Text
}
, Logger : { JSON : Bool, Fmt : Optional Text }
2023-05-11 05:09:16 +02:00
, InitialAdminPassword : Text
2023-05-06 01:24:31 +02:00
, Registration : { Allowed : Bool }
}
, default =
-- | have sane defaults.
{ Host = ""
, Port = 3000
, AppName = "pcmt"
, LiveMode = False
, DevelMode = False
2023-05-13 21:49:50 +02:00
, Session =
{ CookieName = "pcmt_session"
, CookieAuthSecret = ""
, CookieEncrSecret = ""
}
, Logger = { JSON = True, Fmt = None Text }
2023-05-11 05:09:16 +02:00
, InitialAdminPassword =
-- | used for the first admin, forced change on first login.
"50ce50fd0e4f5894d74c4caecb450b00c594681d9397de98ffc0c76af5cff5953eb795f7"
2023-05-06 01:24:31 +02:00
, Registration.Allowed = True
}
}
in Schema