diff options
Diffstat (limited to 'labsrv01/network.nix')
| -rw-r--r-- | labsrv01/network.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/labsrv01/network.nix b/labsrv01/network.nix new file mode 100644 index 0000000..27ee2d2 --- /dev/null +++ b/labsrv01/network.nix @@ -0,0 +1,45 @@ +{ + 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"; + }; + }; + 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) + # }; + # }; + +} |
