those who nginx:
This commit is contained in:
parent
405868d8aa
commit
3ec8cfbb80
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.void.server;
|
let cfg = config.void.server;
|
||||||
in {
|
in {
|
||||||
imports = [ ./dns ];
|
imports = [ ./dns ./nginx.nix ];
|
||||||
|
|
||||||
options.void.server = { isServer = mkEnableOption false; };
|
options.void.server = { isServer = mkEnableOption false; };
|
||||||
|
|
||||||
|
|
30
modules/server/nginx.nix
Normal file
30
modules/server/nginx.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let cfg = config.void.server.nginx;
|
||||||
|
in {
|
||||||
|
imports = [ ./dns ];
|
||||||
|
|
||||||
|
options.void.server.nginx = { enable = mkEnableOption false; };
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "Sayeko@proton.me";
|
||||||
|
};
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
recommendedBrotliSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedZstdSettings = true;
|
||||||
|
|
||||||
|
commonHttpConfig = ''
|
||||||
|
access_log /var/log/nginx/access.log combined_anon buffer=32k flush=5m;
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue