add nginx
This commit is contained in:
32
examples/unciv-nixos.nix
Normal file
32
examples/unciv-nixos.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# nix-build '<nixpkgs/nixos>' -A vm -I nixos-config="examples/unciv-nixos.nix" && result/bin/run-nixos-vm -nographic
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
uc = pkgs.callPackage ../unciv.nix {
|
||||
port = "7443";
|
||||
nginxEnableACME = false;
|
||||
nginxForceSSL = false;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
appendHttpConfig = ''
|
||||
server_names_hash_bucket_size 64;
|
||||
'';
|
||||
sslProtocols = "TLSv1 TLSv1.1 TLSv1.2";
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = false;
|
||||
virtualHosts."unciv.*" = uc.nginx.virtualHosts.unciv;
|
||||
};
|
||||
|
||||
systemd.services.unciv = uc.systemd.services.unciv;
|
||||
|
||||
users.users.root.initialPassword = "root";
|
||||
}
|
||||
Reference in New Issue
Block a user