fix yveltal bridge config
This commit is contained in:
parent
db35575200
commit
149690d340
|
@ -4,7 +4,9 @@
|
|||
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
let bridge = bridge: {mac, iface, ip}@_in: {
|
||||
let bridge = bridge: {mac, iface, ip, gateway}@_in: {
|
||||
systemd.network.enable = true;
|
||||
|
||||
systemd.network.links."${iface}" = {
|
||||
linkConfig.Name = iface;
|
||||
matchConfig.PermanentMACAddress = mac;
|
||||
|
@ -13,6 +15,10 @@ let bridge = bridge: {mac, iface, ip}@_in: {
|
|||
enable = true;
|
||||
bridge = [ bridge ];
|
||||
};
|
||||
systemd.network.networks."${bridge}" = {
|
||||
address = [ ip ];
|
||||
gateway = [ gateway ];
|
||||
};
|
||||
systemd.network.netdevs."${bridge}" = {
|
||||
enable = true;
|
||||
netdevConfig = {
|
||||
|
@ -24,13 +30,14 @@ let bridge = bridge: {mac, iface, ip}@_in: {
|
|||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
../types/k3s-server.nix
|
||||
../types/server.nix
|
||||
];
|
||||
config = lib.mkMerge [
|
||||
(bridge "lan0" {
|
||||
mac = "d8:9e:f3:1b:7f:8a";
|
||||
iface = "phy0";
|
||||
ip = "172.16.1.251/12";
|
||||
gateway = "172.16.1.1";
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
../modules/systemd-efi.nix
|
||||
../modules/luks.nix
|
||||
../modules/users.nix
|
||||
../modules/k3s.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
|
Loading…
Reference in New Issue
Block a user