From 429cc76d0f48c66bdf44206bb5d236280566bbb2 Mon Sep 17 00:00:00 2001 From: EinEtwas Date: Wed, 30 Oct 2024 16:51:37 +0100 Subject: [PATCH] feat(networking): simplify things, now works with eduroam (?) --- modules/essentials/hardware_config.nix | 7 ------- modules/misc_hardware/networking.nix | 18 +++++++++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/modules/essentials/hardware_config.nix b/modules/essentials/hardware_config.nix index acee931..ce2a7ed 100644 --- a/modules/essentials/hardware_config.nix +++ b/modules/essentials/hardware_config.nix @@ -46,13 +46,6 @@ swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/modules/misc_hardware/networking.nix b/modules/misc_hardware/networking.nix index e6727c1..b7cfc0d 100644 --- a/modules/misc_hardware/networking.nix +++ b/modules/misc_hardware/networking.nix @@ -1,15 +1,19 @@ +{ lib, ... }: { networking = { hostName = "rhea-laptop"; # Enable networking - networkmanager.enable = true; - networkmanager.wifi.powersave = true; - - # wireguard.enable = true; - - firewall = { - allowedUDPPorts = [ 51820 ]; # Clients and peers can use the same port, see listenport + networkmanager = { + enable = true; + wifi.powersave = true; + wifi.macAddress = "random"; }; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + useDHCP = lib.mkDefault true; }; }