summaryrefslogtreecommitdiff
path: root/hosts/mox/modules
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-11-13 17:31:53 +0530
committersinanmohd <sinan@sinanmohd.com>2023-11-13 18:08:54 +0530
commit8eb0bd9d2c2e39e5f07226d1a8e226514acd9c78 (patch)
treebb8f650236f457ec25c19d83fed8c7e24a57e248 /hosts/mox/modules
parentbc838a0c45ed6f6984c87eb6de9c075ad520f7d1 (diff)
hosts/mox: init
Diffstat (limited to 'hosts/mox/modules')
-rw-r--r--hosts/mox/modules/network.nix26
1 files changed, 26 insertions, 0 deletions
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 ];
+ };
+ };
+}