From cb76d7092071a95c760d3bcfcff808ca4e5b7f3f Mon Sep 17 00:00:00 2001
From: Julien Malka <julien@malka.sh>
Date: Mon, 9 Jan 2023 17:43:00 +0100
Subject: [PATCH] Better network config

---
 machines/lisa/default.nix | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/machines/lisa/default.nix b/machines/lisa/default.nix
index bb5cb02..5e45ad5 100644
--- a/machines/lisa/default.nix
+++ b/machines/lisa/default.nix
@@ -72,9 +72,7 @@
   networking.interfaces.ens20.useDHCP = false;
   networking.interfaces.ens20.mtu = 1420;
   networking.interfaces.ens20.ipv4.addresses = [{ address = "212.129.40.11"; prefixLength = 32; }];
-  networking.localCommands = ''
-    ip r del default || ip r add default dev ens20 || ip link set dev ens20 mtu 1420 
-  '';
+  networking.defaultGateway.interface = "ens20";
   networking.interfaces.ens18.useDHCP = true;
   networking.interfaces.ens19.useDHCP = false;
   networking.interfaces.ens19.ipv6.addresses = [{