2019-11-10 08:41:19 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
containers = {
|
|
|
|
nginx = {
|
|
|
|
autoStart = false;
|
2021-10-07 00:05:02 +00:00
|
|
|
config = { config, pkgs, ...}: {
|
2019-11-10 08:41:19 +00:00
|
|
|
networking = {
|
|
|
|
firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
};
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
2021-10-07 00:05:02 +00:00
|
|
|
www ={
|
|
|
|
listen = [
|
|
|
|
{ addr = "0.0.0.0"; port = 80; }
|
2019-11-10 08:41:19 +00:00
|
|
|
{ addr = "[::]"; port = 80; }
|
|
|
|
];
|
|
|
|
serverName = "nixos-server";
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
root = "/var/www";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-10-07 00:05:02 +00:00
|
|
|
};
|
2019-11-10 08:41:19 +00:00
|
|
|
};
|
2021-10-07 00:05:02 +00:00
|
|
|
}
|