From 8eb0bd9d2c2e39e5f07226d1a8e226514acd9c78 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 13 Nov 2023 17:31:53 +0530 Subject: hosts/mox: init --- hosts/mox/modules/network.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 hosts/mox/modules/network.nix (limited to 'hosts/mox/modules/network.nix') diff --git a/hosts/mox/modules/network.nix b/hosts/mox/modules/network.nix new file mode 100644 index 0000000..bf7c690 --- /dev/null +++ b/hosts/mox/modules/network.nix @@ -0,0 +1,26 @@ +{ ... }: + +let + wan = "ens18"; + dns = "10.0.0.2"; +in +{ + networking = { + useDHCP = false; + interfaces.${wan}.ipv4.addresses = [{ + address = "10.0.8.101"; + prefixLength = 16; + }]; + defaultGateway = { + address = "10.0.0.1"; + interface = wan; + }; + }; + + services = { + dnsmasq = { + enable = true; + settings.server = [ dns ]; + }; + }; +} -- cgit v1.2.3