fix networking

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-12-05 01:03:49 -05:00
parent 5e46a7b6c2
commit f3771cb927
No known key found for this signature in database
GPG Key ID: 47940175096C1330
2 changed files with 11 additions and 6 deletions

View File

@ -15,7 +15,7 @@
];
boot = {
availableKernelModules = [
initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
@ -32,7 +32,7 @@
# (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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View File

@ -6,9 +6,14 @@
}:
{
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "enp1s0"; # either ens3 or enp1s0 depending on system, check 'ip addr'
networkConfig.DHCP = "ipv4";
networking.useDHCP = false;
systemd.network = {
enable = true;
networks."10-wan" = {
#matchConfig.Name = "enp1s0"; # either ens3 or enp1s0 depending on system, check 'ip addr'
matchConfig.Name = "ether";
networkConfig.DHCP = "ipv4";
};
};
}