File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 220220 if ( builtins . pathExists ./network-config ) then
221221 builtins . fromJSON ( builtins . readFile ./network-config )
222222 else
223- { } ;
223+ {
224+ address = [ ] ;
225+ route = [ ] ;
226+ } ;
224227 network-config = builtins . map ( address : {
225228 name = address . address ;
226229 value = {
227- ip = builtins . map ( ip : { address = "${ ip . local } /${ ip . prefixlen } " ; } ) (
228- builtins . filter ( ip : ip . scope == "global" && ! ip . dynamic ) address . addr_info
230+ ip = builtins . map ( ip : { address = "${ ip . local } /${ builtins . toString ip . prefixlen } " ; } ) (
231+ builtins . filter ( ip : ip . scope == "global" && ! ( ip . dynamic or false ) ) address . addr_info
229232 ) ;
230233 route =
231234 builtins . map
248251 name = "00-${ interface . name } " ;
249252 value = {
250253 matchConfig . MACAddress = interface . name ;
254+ networkConfig = {
255+ DHCP = "yes" ;
256+ LLDP = "yes" ;
257+ IPv6AcceptRA = "yes" ;
258+ MulticastDNS = "yes" ;
259+ } ;
251260 address = builtins . map ( ip : ip . address ) interface . value . ip ;
252261 routes = builtins . map ( route : {
253262 Destination = route . destination ;
You can’t perform that action at this time.
0 commit comments