blob: 49dd88128c7c16d4d68bc836f13e5aec4177eba7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{
lib,
...
}:
{
networking.hostName = "labsrv01";
# Enable systemd-resolved for DNS
networking.nameservers = [ "127.0.0.53" ];
services.resolved = {
enable = true;
llmnr = "true";
extraConfig = ''
MulticastDNS=yes
'';
};
networking.useNetworkd = true;
systemd.network = {
enable = true;
networks."10-enp2s0" = {
matchConfig.Name = "enp2s0";
networkConfig = {
DHCP = "yes";
MulticastDNS = "yes";
IPv6AcceptRA = "yes";
IPv6PrivacyExtensions = "no";
};
ipv6AcceptRAConfig = {
Token = "stable";
};
};
networks."10-wlp3s0" = {
matchConfig.Name = "wlp3s0";
linkConfig.Unmanaged = "yes";
};
};
# Keeping this networkmanager conf handy for wifi purposes on other machines
# but this machine will use networkd.
# networking.networkmanager = lib.mkIf useNetworkManager {
# enable = true;
# dns = "systemd-resolved";
# # Enable mDNS on NetworkManager connections
# connectionConfig = {
# "connection.mdns" = "2"; # 2 = yes (resolve & register)
# };
# };
}
|