The old config style doesn't build anymore on the current release NixOS 20.09. It stopped working some releases ago.
16 lines
395 B
Plaintext
16 lines
395 B
Plaintext
{ config, pkgs, ... }:
|
|
{
|
|
networking.interfaces = {
|
|
<% networks.select {|n| n[:device]}.each do |network| %>
|
|
<%= network[:device] %>.ipv4.addresses = [{
|
|
<% if network[:type] == :static %>
|
|
address = "<%= network[:ip] %>";
|
|
<% end %>
|
|
<% if network[:prefix_length] %>
|
|
prefixLength = <%= network[:prefix_length] %>;
|
|
<% end %>
|
|
}];
|
|
<% end %>
|
|
};
|
|
}
|