Running #nixos on a N150 mini pc as a router for ~6 months: reliable, efficient, and surprisingly capable. Setup notes + power quirks: https://blog.stark.pub/posts/n150-nixos-router/
N150 NixOS router, a guide

Research notes, technical explorations, and things I find interesting.

@perstark great writeup, i wanna do something like this in the near future.

just wondernig while reading - is the boot sysctl forwarding and the network interface IPv4Forwarding not the same thing? As in i Think you might get away with skipping the boot.sysctl stuff and make it interface specific as u have anyway.

@goeranh thanks, it was definitely a fun project. To my knowledge the boot systctl forwarding is needed, but perhaps one could do without the network interface specific one.
@perstark Thanks for the write up . Would you consider a nixos beginner can run this setup ? Would be a good project to replace my little ubiquity edge router which is not capeable to run my internet connection at full speed.
@__sharky__ Sure, it’s always hard to estimate difficulty, but I think if you’re familiar with installing linux, using tty and got some spare time, you’re golden. I think getting basic routing working, dhcp, etc is quite straightforward.
@perstark Nice summary, I also run NixOS on my home firewall. I noticed you are defining both ip and ipv6 with essentially the same nftables rules, have you considered or is there a reason you aren't using inet rules to only define them once?
@kraftnix thanks! Lack of knowledge, I did not know it was possible. But looking it up it seems real nice. Thanks for the comment!
GitHub - chayleaf/nixos-router: A NixOS router framework

A NixOS router framework. Contribute to chayleaf/nixos-router development by creating an account on GitHub.

GitHub
@tuxiqae I looked at it early in the process, but decided I wanted to learn more and was cautious of another abstraction.