nixos/containers/hello.nix
2026-04-20 01:48:22 +02:00

27 lines
669 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 Fuckers I own this now!'";
locations."/".extraConfig = ''
default_type text/plain;
'';
};
};
};
};
}