nix-dotfiles/services/nginx.nix

27 lines
593 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
2023-12-06 22:21:44 +01:00
{
2023-12-27 22:56:53 +01:00
#declare secrets
sops.secrets."nginx/defaultpass" = {
restartUnits = [ "nginx.service" ];
owner = "nginx";
};
# services.oauth2_proxy = {
# enable = true;
# }
#proxy stuff
services.nginx = {
enable = true;
statusPage = true;
enableReload = true;
recommendedTlsSettings = true;
recommendedProxySettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
logError = "syslog:server=unix:/dev/log";
commonHttpConfig = ''
access_log syslog:server=unix:/dev/log;
'';
};
}