nixops: static IP for rpi-5
This commit is contained in:
parent
f42fc3b986
commit
4da3cd5325
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue