summaryrefslogtreecommitdiff
path: root/machines/labsrv01/network.nix
diff options
context:
space:
mode:
authorKj Tsanaktsidis <kjtsanaktsidis@groq.com>2026-01-09 11:58:31 +1100
committerKj Tsanaktsidis <kjtsanaktsidis@groq.com>2026-01-09 11:58:31 +1100
commit98e94297af73c583c9636c99772b2c1c34f98743 (patch)
tree1ac244e55b6d544d556b2327308d07708350e824 /machines/labsrv01/network.nix
parentf5686b8e377ce3ecbf617783b4f2398423cb19fd (diff)
some refactor
Diffstat (limited to 'machines/labsrv01/network.nix')
-rw-r--r--machines/labsrv01/network.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/machines/labsrv01/network.nix b/machines/labsrv01/network.nix
new file mode 100644
index 0000000..49dd881
--- /dev/null
+++ b/machines/labsrv01/network.nix
@@ -0,0 +1,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)
+ # };
+ # };
+
+}