fix networking
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
parent
5e46a7b6c2
commit
f3771cb927
@ -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";
|
||||
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user