This is how I currently manage my RPi NAS on NixOS: https://github.com/smasher164/nas.
Exposing Home Assistant over it allows me to do things like turn my lights off when I'm away from home, without exposing stuff to the public internet. https://www.blog.akhil.cc/shelly-dimmer