configuration.nix/hosts/rico2/network.nix

35 lines
653 B
Nix
Raw Normal View History

2023-08-19 23:20:07 +05:30
{lib, ...}: {
2023-10-08 15:36:04 +05:30
imports = [./wireguard.nix];
2023-08-19 23:20:07 +05:30
networking = {
hostName = "Rico2";
useDHCP = lib.mkDefault false;
};
services.resolved.enable = true;
systemd.network = {
enable = true;
networks = {
"40-ether" = {
enable = true;
matchConfig = {
Type = "ether";
};
networkConfig = {
DHCP = "yes";
IgnoreCarrierLoss = "3s";
};
dhcpV4Config = {
UseDomains = true;
};
ipv6AcceptRAConfig = {
UseDomains = true;
};
linkConfig = {
RequiredForOnline = "yes";
};
};
};
};
}