29 lines
554 B
Nix
29 lines
554 B
Nix
{ pkgs, ... }: {
|
|
services = {
|
|
getty.autologinUser = "root";
|
|
nginx = {
|
|
enable = true;
|
|
virtualHosts.localhost.locations."/" = {
|
|
index = "index.html";
|
|
|
|
root = pkgs.writeTextDir "index.html" ''
|
|
<html>
|
|
<body>
|
|
Hello World!
|
|
</body>
|
|
</html>
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
virtualisation.forwardPorts = [{
|
|
from = "host";
|
|
guest.port = 80;
|
|
host.port = 8080;
|
|
}];
|
|
|
|
system.stateVersion = "23.11";
|
|
}
|