mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
hosts/ni: convert to systemd-networkd for network config
I thought it is pretty neat. Also, I've created a bond interface for the network devices.
This commit is contained in:
parent
333adf0ce6
commit
c3a5778d3f
@ -25,9 +25,50 @@
|
|||||||
|
|
||||||
swapDevices = [{ label = "swap"; }];
|
swapDevices = [{ label = "swap"; }];
|
||||||
|
|
||||||
networking.useDHCP = false;
|
networking = {
|
||||||
networking.interfaces.enp1s0.useDHCP = true;
|
useDHCP = false;
|
||||||
networking.interfaces.wlp2s0.useDHCP = true;
|
usePredictableInterfaceNames = true;
|
||||||
|
useNetworkd = true;
|
||||||
|
|
||||||
|
# We're using networkd to configure so we're disabling this
|
||||||
|
# service.
|
||||||
|
dhcpcd.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable systemd-resolved. This is mostly setup by `systemd.network.enable`
|
||||||
|
# by we're being explicit just to be safe.
|
||||||
|
services.resolved = {
|
||||||
|
enable = true;
|
||||||
|
llmnr = "true";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Combining my ethernet and wireless network interfaces.
|
||||||
|
systemd.network = {
|
||||||
|
enable = true;
|
||||||
|
netdevs."40-bond1" = {
|
||||||
|
netdevConfig = {
|
||||||
|
Name = "bond1";
|
||||||
|
Kind = "bond";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networks = {
|
||||||
|
"40-bond1" = {
|
||||||
|
matchConfig.Name = "bond1";
|
||||||
|
networkConfig.DHCP = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
"40-bond1-dev1" = {
|
||||||
|
matchConfig.Name = "enp1s0";
|
||||||
|
networkConfig.Bond = "bond1";
|
||||||
|
};
|
||||||
|
|
||||||
|
"40-bond1-dev2" = {
|
||||||
|
matchConfig.Name = "wlp2s0";
|
||||||
|
networkConfig.Bond = "bond1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||||
|
Loading…
Reference in New Issue
Block a user