From 4da3cd5325f06f2cef4c80ab6598803ea6cd54cc Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 4 Mar 2021 17:19:13 +0800 Subject: [PATCH] nixops: static IP for rpi-5 --- nixops/rpi-server.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nixops/rpi-server.nix b/nixops/rpi-server.nix index 0a4b869f..b4118d99 100644 --- a/nixops/rpi-server.nix +++ b/nixops/rpi-server.nix @@ -62,6 +62,26 @@ rsn_pairwise=CCMP ''; }; + networking.interfaces.eth0 = { + ipv4.addresses = [{ + address = "192.168.1.205"; + prefixLength = 24; + }]; + ipv6.addresses = [{ + address = "2001:470:f821:1:dea6:32ff:fe95:2fcf"; + prefixLength = 64; + }]; + ipv4.routes = [{ + address = "0.0.0.0"; + prefixLength = 0; + via = "192.168.1.1"; + }]; + ipv6.routes = [{ + address = "::"; + prefixLength = 0; + via = "fe80::523e:aaff:fe0c:e49d"; + }]; + }; networking.interfaces.wlan0 = { ipv4.addresses = [{ address = "192.168.13.1"; @@ -74,12 +94,14 @@ }; services.dnsmasq = { enable = true; + servers = ["192.168.1.1#53"]; extraConfig = '' interface=wlan0 bind-interfaces dhcp-range=192.168.13.10,192.168.13.254,24h enable-ra dhcp-range=::,constructor:wlan0,ra-only + no-resolv ''; }; boot.kernel.sysctl."net.ipv4.ip_forward" = 1;