50 lines
1.0 KiB
Nix
50 lines
1.0 KiB
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";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
ocd = {
|
|
autoStart = false;
|
|
bindMounts = {
|
|
"/go" = {
|
|
hostPath = "/home/michael/go";
|
|
isReadOnly = false;
|
|
};
|
|
};
|
|
config = { config, pkgs, ... }: {
|
|
networking = {
|
|
firewall.allowedTCPPorts = [ 8000 ];
|
|
};
|
|
environment.systemPackages = with pkgs; [
|
|
go_bootstrap
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|