Guide to NixOS based router 2023 - part 2 - software


I finally finished second part of my blogpost that you can find here

I tried to gather all best nix and networking practices that I learned so far. I hope that this guide will serve as a reference for others who might want also to setup their own home routers using nix.

Please let me know what you think of it.


This is a great write-up! I appreciate the detail. Now I am on a Banana Pi click-spiral; thank you for that!

1 Like

Thank you for this, very useful. A question I would like to ask:

Is dnsmasq a (better) alternative to what I’ve tried below? = “:auto”;

Mine ‘works’ gives out addresses, but WIP for me because the mesh wifi attached cannot see ‘internet’ after experimenting some time so far.

I am new to the detail of Linux networking , have more to learn here, and keen to copy/find the canonical way.

Your blog is the best I have come across and is much appreciated.

I’d need to see a diagram of this , to work out exactly what the problem was?

you mention mesh wifi, do you think thats related? i presume everything is bridge and lives on the same subnet, if it’s doesn’t then your gateway is going to be have to told about these extra subnets on your network, else you won’t be able to get traffic back from the gateway. default routes don’‘t cut it when you have more than once choice’.

1 Like

Thank you - I will generate a diagram. It is between gateway (5g modem) wireless AP as a NixOS router [wireless client] and [wired dhcp sever] to the ethernet port on a mesh master (1 of 3). Being a wireless client I think the bridge is not possible?

3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet brd scope global enp3s0
4: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet metric 1024 brd scope global dynamic wlp2s0

default via dev wlp2s0 proto dhcp src metric 1024 dev wlp2s0 proto kernel scope link src metric 1024 dev wlp2s0 proto dhcp scope link src metric 1024

I want to give , because it can generate markdown that github can render…

so it might be fun.

not sure discourse can render it…

1 Like