feat: add initial config
This commit is contained in:
commit
fb98563bb6
26 changed files with 576 additions and 0 deletions
25
services/nginx.nix
Normal file
25
services/nginx.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
serviceConfig = import ../config/services.nix;
|
||||
nginxModel = import ../intermediate/nginx.nix;
|
||||
in
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = nginxModel.validatedEndpoints != [];
|
||||
message = "No endpoints configured. Add endpoint declarations under config/endpoints/.";
|
||||
}
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
enable = serviceConfig.nginx.enable;
|
||||
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
streamConfig = nginxModel.streamConfig;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = nginxModel.nginxUsedPorts;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue