From 29ee9334416b2e8b3ba529e855442d25f2290194 Mon Sep 17 00:00:00 2001 From: xenia Date: Tue, 25 Jun 2024 18:03:54 +0200 Subject: [PATCH] fuck ethernet we using wifi in this bitch --- flake.nix | 6 +----- nixos/networking.nix | 18 ++++-------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index 009536e6..94a602e5 100644 --- a/flake.nix +++ b/flake.nix @@ -102,11 +102,7 @@ inherit pkgs; background = "pan-wire-3.png"; }; - networking = mkNixOsNetworking { - inherit pkgs; - eth-interface = "enp0s31f6"; - static-ip = "192.168.0.199"; - }; + networking = mkNixOsNetworking { inherit pkgs; }; coral = let diff --git a/nixos/networking.nix b/nixos/networking.nix index c695cccf..726c695d 100644 --- a/nixos/networking.nix +++ b/nixos/networking.nix @@ -1,21 +1,11 @@ { pkgs, - eth-interface ? "eth0", - static-ip ? false, # false, or IPv4 address as string - default-gateway ? "192.168.1.1", }: - let static-ip-conf = if static-ip != false then { - networking.defaultGateway = { address = default-gateway; interface = eth-interface; }; - networking.useDHCP = false; - networking.interfaces.${eth-interface}.ipv4.addresses = [ { - address = static-ip; - prefixLength = 24; - } ]; - networking.networkmanager.unmanaged = [eth-interface]; - } else {}; -in pkgs.lib.attrsets.recursiveUpdate static-ip-conf { - networking.networkmanager.enable = true; + networking.networkmanager = { + enable = true; + dhcp = "dhcpcd"; + }; networking.nameservers = [ "8.8.8.8" ]; networking.resolvconf.enable = true; networking.resolvconf.dnsExtensionMechanism = false; # edns seems to be fucky with this enabled