banawa-chat/config.ml
Reynir Björnsson a82fe0107a Initial commit
You can log in and chat, but it's broken in many ways.
2023-05-03 15:43:23 +02:00

22 lines
694 B
OCaml

open Mirage
let port =
let doc = Key.Arg.info ~doc:"The TCP port for listening for SSH connections" ["port"] in
Key.(create "port" Arg.(opt int 22 doc))
let hostkey =
let doc = Key.Arg.info ~doc:"SSH host key" ["hostkey"] in
Key.(create "hostkey" Arg.(required string doc))
let main =
let packages = [
package "banawa-mirage" ~pin:"git+https://github.com/sorbusursina/banawa-ssh.git";
] in
let keys = [ Key.v port ; Key.v hostkey ] in
foreign ~keys ~packages "Unikernel.Main" (random @-> time @-> mclock @-> stackv4v6 @-> job)
let () =
register "banawa-chat" [
main $ default_random $ default_time $ default_monotonic_clock $ generic_stackv4v6 default_network
]