nixos-server-config/nix-containers.nix
Michael 0af68cd830 updated 20.09 server configuration
Signed-off-by: Michael <michael.lindman@gmail.com>
2021-10-07 01:05:02 +01:00

31 lines
666 B
Nix

{ config, pkgs, ... }:
{
containers = {
nginx = {
autoStart = false;
config = { config, pkgs, ...}: {
networking = {
firewall.allowedTCPPorts = [ 80 ];
};
services.nginx = {
enable = true;
virtualHosts = {
www ={
listen = [
{ addr = "0.0.0.0"; port = 80; }
{ addr = "[::]"; port = 80; }
];
serverName = "nixos-server";
locations = {
"/" = {
root = "/var/www";
};
};
};
};
};
};
};
};
}