# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, lib, inputs, ... }: let bridge = bridge: {mac, iface, ip}@_in: { systemd.network.links."${iface}" = { linkConfig.Name = iface; matchConfig.PermanentMACAddress = mac; }; systemd.network.networks."${iface}" = { enable = true; bridge = [ bridge ]; }; systemd.network.netdevs."${bridge}" = { enable = true; netdevConfig = { Name = bridge; Kind = "bridge"; }; }; }; in { imports = [ # Include the results of the hardware scan. ../types/k3s-server.nix ]; config = lib.mkMerge [ (bridge "lan0" { mac = "50:9a:4c:49:cc:1b"; iface = "phy0"; ip = "172.16.1.252/12"; }) ]; #"98:b7:85:01:36:ee" #"98:b7:85:01:36:ed" #"98:b7:85:01:36:ec" #"98:b7:85:01:36:1f" }