Files
unciv/examples/unciv-nixos.nix
stubbfelnewpc d211d67165 add nginx
2022-08-30 21:04:56 +00:00

33 lines
793 B
Nix

# 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";
}