forked from M-Labs/it-infra
nixops: static IP for rpi-5
This commit is contained in:
parent
f42fc3b986
commit
4da3cd5325
|
@ -62,6 +62,26 @@
|
||||||
rsn_pairwise=CCMP
|
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 = {
|
networking.interfaces.wlan0 = {
|
||||||
ipv4.addresses = [{
|
ipv4.addresses = [{
|
||||||
address = "192.168.13.1";
|
address = "192.168.13.1";
|
||||||
|
@ -74,12 +94,14 @@
|
||||||
};
|
};
|
||||||
services.dnsmasq = {
|
services.dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
servers = ["192.168.1.1#53"];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
interface=wlan0
|
interface=wlan0
|
||||||
bind-interfaces
|
bind-interfaces
|
||||||
dhcp-range=192.168.13.10,192.168.13.254,24h
|
dhcp-range=192.168.13.10,192.168.13.254,24h
|
||||||
enable-ra
|
enable-ra
|
||||||
dhcp-range=::,constructor:wlan0,ra-only
|
dhcp-range=::,constructor:wlan0,ra-only
|
||||||
|
no-resolv
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
|
Loading…
Reference in New Issue