Files
nix-config/systems/aarch64-linux/mac-nixos/networking.nix

44 lines
1.1 KiB
Nix

{ pkgs, lib, ... }:
{
# Networking configs
networking = {
hostName = "macbook-pro-nixos";
wireless.iwd = {
enable = true;
settings = {
General = {
EnableNetworkConfiguration = true;
};
Rank = {
BandModifier2_4GHz = 1.0;
BandModifier5GHz = 5.0;
BandModifier6GHz = 10.0;
};
# DriverQuirks = {
# PowerSaveDisable = "hci_bcm4377,brcmfmac";
# };
Network = {
AutoConnect = true;
};
};
};
# Enable Network Manager
networkmanager = {
enable = lib.mkForce false;
wifi = {
backend = lib.mkForce "iwd";
powersave = lib.mkDefault false;
};
settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt";
};
# orca
firewall.extraCommands = ''
iptables -I INPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -I INPUT -p udp -m udp --match multiport --dports 1990,2021 -j ACCEPT
'';
};
}