feat: local unique address for nucnix

This commit is contained in:
Patrick 2025-01-03 18:02:05 +01:00
parent 0bf5484e69
commit d6b0a70a6f
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
2 changed files with 34 additions and 30 deletions

View file

@ -21,36 +21,39 @@
"br-home" "br-home"
]; ];
hardware.wirelessRegulatoryDatabase = true; hardware.wirelessRegulatoryDatabase = true;
# systemd.network = { systemd.network = {
# netdevs."40-br-home" = { netdevs."40-br-home" = {
# netdevConfig = { netdevConfig = {
# Name = "br-home"; Name = "br-home";
# Kind = "bridge"; Kind = "bridge";
# }; };
# }; };
# networks."10-mv-home" = { networks."10-mv-home" = {
# networkConfig = { networkConfig = {
# LinkLocalAddressing = "no"; LinkLocalAddressing = "no";
# IPv6AcceptRA = lib.mkForce false; IPv6AcceptRA = lib.mkForce false;
# Bridge = "br-home"; Bridge = "br-home";
# }; };
# matchConfig.Name = "mv-home"; address = lib.mkForce [ ];
# DHCP = "no"; gateway = lib.mkForce [ ];
# }; DHCP = "no";
# networks."10-home" = { };
# matchConfig.Name = "br-home"; networks."10-home" = {
# DHCP = "yes"; matchConfig.Name = "br-home";
# }; DHCP = "no";
# networks."40-wifi" = { address = [ "10.99.10.19/24" ];
# matchConfig.Name = "wlan1"; gateway = [ "10.99.10.1" ];
# networkConfig = { };
# LinkLocalAddressing = "no"; networks."40-wifi" = {
# IPv6AcceptRA = lib.mkForce false; matchConfig.Name = "wlan1";
# Bridge = "br-home"; networkConfig = {
# }; LinkLocalAddressing = "no";
# DHCP = "no"; IPv6AcceptRA = lib.mkForce false;
# }; Bridge = "br-home";
# }; };
DHCP = "no";
};
};
networking.nftables.firewall.zones.wlan.interfaces = [ "wlan1" ]; networking.nftables.firewall.zones.wlan.interfaces = [ "wlan1" ];
networking.nftables.firewall.zones.home.interfaces = [ "mv-home" ]; networking.nftables.firewall.zones.home.interfaces = [ "mv-home" ];

View file

@ -123,6 +123,7 @@ in
"20-lan-${name}" = { "20-lan-${name}" = {
address = [ address = [
(lib.net.cidr.hostCidr 1 cidrv4) (lib.net.cidr.hostCidr 1 cidrv4)
(lib.net.cidr.hostCidr 1 cidrv6)
]; ];
matchConfig.Name = "lan-${name}"; matchConfig.Name = "lan-${name}";
networkConfig = { networkConfig = {