28 lines
544 B
Nix
28 lines
544 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;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||
|
}
|