nixos-config/hosts/nuc/modules/networks/default.nix
2023-04-27 18:11:10 +02:00

31 lines
568 B
Nix

{ config, ... }:
{
networking = {
hostName = "nuc";
useNetworkd = true;
enableIPv6 = true;
};
services.resolved = {
enable = true;
# make room for the adguard dns
extraConfig = ''
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
'';
};
systemd.network = {
enable = true;
networks."10-loopback" = {
matchConfig.Name = "lo";
linkConfig.RequiredForOnline = false;
};
networks."10-wired" = {
matchConfig.Name = "eno1";
networkConfig = {
DHCP = "yes";
};
};
};
}