{ config, pkgs, ... }: { containers = { nginx = { autoStart = false; config = { config, pkgs, ...}: { networking = { firewall.allowedTCPPorts = [ 80 ]; }; services.nginx = { enable = true; virtualHosts = { www ={ listen = [ { addr = "0.0.0.0"; port = 80; } { addr = "[::]"; port = 80; } ]; serverName = "nixos-server"; locations = { "/" = { root = "/var/www"; }; }; }; }; }; }; }; }; }