configuration.nix/hosts/rico1/network.nix

35 lines
657 B
Nix
Raw Normal View History

2023-11-04 16:12:45 +05:30
{ lib, ... }: {
imports = [ ./wireguard.nix ];
2023-08-19 23:20:07 +05:30
networking = {
hostName = "Rico1";
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";
};
};
};
};
}