Title: Creating a NixOS live USB for a full featured APU router
Author: Solène
Date: 03 August 2022
Tags: networking security nixos apu
Description: This explains how to create a live USB image of NixOS to
boot on an APU router including all required features for your network.
# Introduction
At home, I'm running my own router to manage Internet, run DHCP, do
filter and caching etc... I'm using an APU2 running OpenBSD, it works
great so far, but I was curious to know if I could manage to run NixOS
on it without having to deal with serial console and installation.
It turned out it's possible! By configuring and creating a live NixOS
USB image, one can plug the USB memory stick into the router and have
an immutable NixOS.
HTML NixOS wiki about creating a NixOS live CD/USB
# Network diagram
Here is a diagram of my network. It's really simple except the bridge
part that require an explanation. The APU router has 3 network
interfaces and I only need 2 of them (one for WAN and one for LAN), but
my switch doesn't have enough ports for all the devices, just missing
one, so I use the extra port of the APU to connect that device to the
whole LAN by bridging the two network interfaces.
```
+----------------+
| INTERNET |
+----------------+
|
|
|
+----------------+
| ISP ROUTER |
+----------------+
| 192.168.1.254
|
|
| 192.168.1.111
+----------------+
| APU ROUTER |
+----------------+
|bridge #2 and #3|
| 10.42.42.42 |
+----------------+
|port #3 |
| | port #2
+----------+ |
| |
| +--------+ +----------+
| 10.42.42.150 | switch |-----| Devices |
+--------+ +--------+ +----------+
| NAS |
+--------+
```
dataswamp.org:70 /~solene/article-nixos-with-live-usb-router:60: port field too long