This seems like it directly uses nftables rules, but ive seen a couple of aspiring Nix router repos that already offer nix module configuration like https://github.com/chayleaf/nixos-router that dont require you to be a networking expert, however it seems to be a long way off from a featureful router system. If you are after a declaratively configured router i would just go with VyOS.