fuck ethernet we using wifi in this bitch

This commit is contained in:
xenia 2024-06-25 18:03:54 +02:00
parent e38491d9e3
commit 29ee933441
2 changed files with 5 additions and 19 deletions

View File

@ -102,11 +102,7 @@
inherit pkgs; inherit pkgs;
background = "pan-wire-3.png"; background = "pan-wire-3.png";
}; };
networking = mkNixOsNetworking { networking = mkNixOsNetworking { inherit pkgs; };
inherit pkgs;
eth-interface = "enp0s31f6";
static-ip = "192.168.0.199";
};
coral = coral =
let let

View File

@ -1,21 +1,11 @@
{ {
pkgs, 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.nameservers = [ "8.8.8.8" ];
networking.resolvconf.enable = true; networking.resolvconf.enable = true;
networking.resolvconf.dnsExtensionMechanism = false; # edns seems to be fucky with this enabled networking.resolvconf.dnsExtensionMechanism = false; # edns seems to be fucky with this enabled