1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24{ services = {
getty.autologinUser = "root";
caddy = {
enable = true;
virtualHosts."nixosvm.local".extraConfig = ''
header Content-Type text/html
respond <<HTML
<html>
<head><title>Foo</title></head>
<body>Foo</body>
</html>
HTML 200
'';
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
virtualisation.forwardPorts = [
{ from = "host"; guest.port = 80; host.port = 8080; }
{ from = "host"; guest.port = 443; host.port = 8443; }
];
system.stateVersion = "25.05";
}