nixos-config/hosts/nuc/modules/networks/default.nix

31 lines
568 B
Nix
Raw Normal View History

2023-01-23 23:35:44 +01:00
{ config, ... }:
{
networking = {
2023-04-06 22:31:45 +02:00
hostName = "nuc";
2023-01-23 23:35:44 +01:00
useNetworkd = true;
2023-04-12 15:06:17 +02:00
enableIPv6 = true;
2023-01-23 23:35:44 +01:00
};
2023-04-27 18:11:10 +02:00
services.resolved = {
enable = true;
# make room for the adguard dns
extraConfig = ''
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
'';
};
2023-01-23 23:35:44 +01:00
systemd.network = {
enable = true;
networks."10-loopback" = {
matchConfig.Name = "lo";
linkConfig.RequiredForOnline = false;
};
networks."10-wired" = {
matchConfig.Name = "eno1";
networkConfig = {
DHCP = "yes";
};
};
};
}