27 lines
625 B
Nix
27 lines
625 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
containers.hello = {
|
|
autoStart = true;
|
|
privateNetwork = true;
|
|
hostAddress = "192.168.100.10";
|
|
localAddress = "192.168.100.11";
|
|
|
|
config = { config, pkgs, ... }: {
|
|
system.stateVersion = "25.11";
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
virtualHosts."localhost" = {
|
|
# Return a 200 OK directly from nginx
|
|
locations."/".return = "200 'Hello world!'";
|
|
locations."/".extraConfig = ''
|
|
default_type text/plain;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|