From dd10a6ba6b72876f59bc81fe8103053a324676c0 Mon Sep 17 00:00:00 2001
From: Luke Granger-Brown <hg@lukegb.com>
Date: Sun, 19 Jun 2022 20:34:43 +0000
Subject: [PATCH] totoro: switch to networkd

---
 ops/nixos/totoro/default.nix | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/ops/nixos/totoro/default.nix b/ops/nixos/totoro/default.nix
index 7a243c13e2..e58980f18e 100644
--- a/ops/nixos/totoro/default.nix
+++ b/ops/nixos/totoro/default.nix
@@ -90,11 +90,15 @@ in {
     hostName = "totoro"; # Define your hostname.
     domain = "int.as205479.net";
     hostId = "676c08c4";
-    interfaces.br-ext.useDHCP = true;
+    useNetworkd = true;
     bridges.br-ext.interfaces = [ "enp0s31f6" ];
+    interfaces.br-ext = {
+      ipv4.addresses = [
+        { address = "192.168.1.40"; prefixLength = 24; }
+      ];
+    };
 
     interfaces.br-int = {
-      virtual = true;
       ipv4.addresses = [{ address = "10.0.0.2"; prefixLength = 24; }];
     };
     bridges.br-int.interfaces = [];
@@ -118,7 +122,6 @@ in {
 
     macvlans.mv-plex = { interface = "br-ext"; };
     interfaces.mv-plex = {
-      virtual = true;
       ipv4.addresses = [
         # plex-totoro
         { address = "92.118.30.20"; prefixLength = 32; }
@@ -133,6 +136,11 @@ in {
       { address = "92.118.30.19"; prefixLength = 32; }
     ];
   };
+  systemd.network = {
+    networks."40-br-int" = {
+      linkConfig.RequiredForOnline = "no";
+    };
+  };
   my.ip.tailscale = "100.122.86.11";
 
   # Virtualisation