From 48ab2b7cab9930c776e4fb4559a044a9a973a366 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Fri, 10 Jan 2025 00:09:51 +0000
Subject: [PATCH] Add floating IP address

---
 nix/hosts/hetznix/configuration.nix |  6 +-----
 nix/hosts/hetznix/networking.nix    | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 5 deletions(-)
 create mode 100644 nix/hosts/hetznix/networking.nix

diff --git a/nix/hosts/hetznix/configuration.nix b/nix/hosts/hetznix/configuration.nix
index b19b11c7..54cfffc2 100644
--- a/nix/hosts/hetznix/configuration.nix
+++ b/nix/hosts/hetznix/configuration.nix
@@ -12,6 +12,7 @@
 
     ./disks.nix
     ./hardware-configuration.nix
+    ./networking.nix
     ./secrets.nix
     ./security
     ./services
@@ -27,11 +28,6 @@
     nixPath = [ "nixpkgs=${inputs.nixpkgs-2405}" ];
   };
 
-  networking.firewall.allowedTCPPorts = [
-    80
-    443
-  ];
-
   boot.loader.grub = {
     efiSupport = true;
     efiInstallAsRemovable = true;
diff --git a/nix/hosts/hetznix/networking.nix b/nix/hosts/hetznix/networking.nix
new file mode 100644
index 00000000..56da7730
--- /dev/null
+++ b/nix/hosts/hetznix/networking.nix
@@ -0,0 +1,19 @@
+{
+  networking = {
+    firewall.allowedTCPPorts = [
+      80
+      443
+    ];
+
+    interfaces.enp1s0 = {
+      useDHCP = true;
+
+      ipv4.addresses = [
+        {
+          address = "116.203.11.255";
+          prefixLength = 32;
+        }
+      ];
+    };
+  };
+}