From 9bee43fc50977853e7c6fa611274c608dd409981 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 28 Apr 2025 16:53:28 +0300 Subject: [PATCH] networking: random mac Signed-off-by: unexplrd --- hosts/dunamis/networking.nix | 5 ++++- modules/nixos/system/wireless/wifi.nix | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hosts/dunamis/networking.nix b/hosts/dunamis/networking.nix index 42f79fb..eaeaa3f 100644 --- a/hosts/dunamis/networking.nix +++ b/hosts/dunamis/networking.nix @@ -2,6 +2,9 @@ networking = { hostId = "c7f6c4a1"; hostName = "dunamis"; - networkmanager.enable = true; + networkmanager = { + enable = true; + ethernet.macAddress = "stable"; + }; }; } diff --git a/modules/nixos/system/wireless/wifi.nix b/modules/nixos/system/wireless/wifi.nix index a4ac5d8..8c492ec 100644 --- a/modules/nixos/system/wireless/wifi.nix +++ b/modules/nixos/system/wireless/wifi.nix @@ -12,7 +12,11 @@ in { }; config = mkIf cfg.enable { networking = { - networkmanager.wifi.backend = "iwd"; + networkmanager.wifi = { + backend = "iwd"; + macAddress = "random"; + scanRandMacAddress = true; + }; wireless.iwd = { enable = true; settings = {