For iptables I used to run iptables-restore < /etc/iptables/rules.v4
which would flush rules and restore them from /etc/iptables/rules.v4.
For nftables, I found nft -f /etc/nftables.conf
, but the rules are not flushed* prior to restoring them from /etc/nftables.conf.
Is there a one-liner that flushes nftables rules and restores them from a file?
*Note that any rules already loaded are not automatically flushed.