17 lines
375 B
Text
17 lines
375 B
Text
let ip = ./ip.dhall
|
|
|
|
let Address = < ip : ip.Address | dhcp >
|
|
|
|
let local =
|
|
\(suffix : Natural) ->
|
|
Address.ip (ip.address "192.168.1.${Natural/show suffix}" 24)
|
|
|
|
let Host
|
|
: Type
|
|
= { name : Text, address : Address }
|
|
|
|
let host
|
|
: Text -> Address -> Host
|
|
= \(name : Text) -> \(address : Address) -> { name, address }
|
|
|
|
in {Host, Address, host, local}
|