I want to use service.create_ap
in bridge mode with a static IP configuration on my raspberry pi.
# add wireless AP
services.create_ap.enable = true;
services.create_ap.settings = {
INTERNET_IFACE = "eth0";
SHARE_METHOD = "bridge";
PASSPHRASE = "1234";
SSID = "sensor";
WIFI_IFACE = "wlan0";
};
Configuring a static ip on eth0 doesn’t seem to work.
networking.interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [
{ address = "XX"; prefixLength = 24; }
];
};
systemctl also shows issues on startup
× network-addresses-eth0.service - Address configuration of eth0
Loaded: loaded (/etc/systemd/system/network-addresses-eth0.service; enabled; preset: ignored)
Active: failed (Result: exit-code) since Sat 2025-06-07 17:10:35 CEST; 5min ago
Invocation: 1481753a80894d7b9fd03b8f2ffbafa9
Process: 659 ExecStart=/nix/store/mbq02grgydqikyv54d2w3yq4pzzsdkcs-unit-script-network-addresses-eth0-start/bin/network-addresses-eth0-start (code=exited, status=1/FAILURE)
Main PID: 659 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
IO: 736K read, 0B written
CPU: 163ms
Jun 07 17:10:35 hostname systemd[1]: Starting Address configuration of eth0...
Jun 07 17:10:35 hostname network-addresses-eth0-start[667]: Cannot find device "eth0"
Jun 07 17:10:35 hostname systemd[1]: network-addresses-eth0.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 17:10:35 hostname systemd[1]: network-addresses-eth0.service: Failed with result 'exit-code'.
Jun 07 17:10:35 hostname systemd[1]: Failed to start Address configuration of eth0.
× network-setup.service - Networking Setup
Loaded: loaded (/etc/systemd/system/network-setup.service; enabled; preset: ignored)
Active: failed (Result: exit-code) since Sat 2025-06-07 17:10:37 CEST; 5min ago
Invocation: bca140dd63844f4284eb9b6dc82fdc6c
Process: 677 ExecStart=/nix/store/q6nlbyk3ymzb12giq5m5vxizwh28clb4-unit-script-network-setup-start/bin/network-setup-start (code=exited, status=2)
Main PID: 677 (code=exited, status=2)
IP: 0B in, 0B out
IO: 24K read, 0B written
CPU: 758ms
Jun 07 17:10:35 hostname systemd[1]: Starting Networking Setup...
Jun 07 17:10:39 hostname network-setup-start[755]: Error: Device for nexthop is not up.
Jun 07 17:10:37 hostname systemd[1]: network-setup.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 07 17:10:37 hostname systemd[1]: network-setup.service: Failed with result 'exit-code'.
Jun 07 17:10:37 hostname systemd[1]: Failed to start Networking Setup.
but its a bit unclear to me what else i should configure, since trying to set a static ip on br0 fails even more and doesn’t even create the eth0 interface.
So any pointers on how to use service.create_ap
in bridge mode with a static ip would help me