 sudo nix-shell -p iptables --run "iptables -L"
 ...
 nixos-fw-accept  tcp  --  anywhere             anywhere             tcp dpt:ssh
nixos-fw-accept  tcp  --  anywhere             anywhere             tcp dpt:http
nixos-fw-accept  tcp  --  anywhere             anywhere             tcp dpt:https
...

sudo nixos-container root-login nextcloud

[root@nextcloud:~]# curl http://192.168.12.71
<!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="en" data-locale="en" translate="no" >
...

from host
curl http://192.168.12.71:80
^C

s wayne@192.168.12.71
Permission denied, please try again.
Received disconnect from 192.168.12.71 port