BIG changes. Make almost every server service modular, to distribute among multiple servers
This commit is contained in:
parent
30fc0dc800
commit
7e40fd4fb3
44 changed files with 153 additions and 143 deletions
28
modules/system/services/server/nginx/default.nix
Normal file
28
modules/system/services/server/nginx/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./acme
|
||||
./rtmp
|
||||
./user
|
||||
./virtualhosts
|
||||
];
|
||||
|
||||
options.services.webserver.enable = lib.mkEnableOption "Enable nginx related services";
|
||||
|
||||
config = lib.mkIf config.system.server.enable {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/www" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue