33 lines
647 B
Nix
33 lines
647 B
Nix
{ pkgs
|
|
, ...}: {
|
|
services.nginx = {
|
|
enable = true;
|
|
|
|
# enable all recommended settings
|
|
recommendedTlsSettings = true;
|
|
recommendedOptimisation = true;
|
|
recommendedGzipSettings = true;
|
|
recommendedProxySettings = true;
|
|
|
|
virtualHosts = {
|
|
"_" = {
|
|
rejectSSL = true;
|
|
extraConfig = "return 444;";
|
|
};
|
|
|
|
"514fpv.one" = {
|
|
root = pkgs.callPackage ./site { };
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
};
|
|
|
|
"www.514fpv.one" = {
|
|
globalRedirect = "514fpv.one";
|
|
enableACME = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
}
|