nixos/containers/hello.nix
Jakub Dorfman c7c261332e merge
2026-04-20 01:42:32 +02:00

27 lines
652 B
Nix
Executable file

{ 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;
'';
};
};
};
};
}