nginx: Make recommended settings global
This commit is contained in:
parent
a5622c3653
commit
80fcaab244
|
@ -36,11 +36,6 @@
|
|||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys";
|
||||
|
|
|
@ -15,14 +15,7 @@
|
|||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
};
|
||||
services.nginx.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys";
|
||||
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts."okarin.sbruder.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
|
@ -41,11 +41,6 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts."sbruder.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
|
@ -42,11 +42,6 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts = {
|
||||
"vueko.sbruder.de" = {
|
||||
enableACME = true;
|
||||
|
|
|
@ -6,6 +6,7 @@ in
|
|||
options.sbruder.nginx = {
|
||||
hardening.enable = lib.mkEnableOption "nginx hardening";
|
||||
privacy.enable = (lib.mkEnableOption "nginx privacy options") // { default = true; };
|
||||
recommended.enable = (lib.mkEnableOption "recommended options") // { default = true; };
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
|
@ -26,5 +27,13 @@ in
|
|||
access_log off;
|
||||
'';
|
||||
})
|
||||
(lib.mkIf cfg.recommended.enable {
|
||||
services.nginx = {
|
||||
recommendedGzipSettings = lib.mkDefault true;
|
||||
recommendedOptimisation = lib.mkDefault true;
|
||||
recommendedProxySettings = lib.mkDefault true;
|
||||
recommendedTlsSettings = lib.mkDefault true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue