about summary refs log tree commit diff
path: root/users/sterni/machines/ingeborg/http/nginx.nix
blob: d551b8391d1864c993df0634639f4f69d8105444 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ ... }:

{
  config = {
    users = {
      users.http = {
        isSystemUser = true;
        group = "http";
      };

      groups.http = { };
    };

    services.nginx = {
      enable = true;
      recommendedTlsSettings = true;
      recommendedGzipSettings = true;
      recommendedProxySettings = true;

      user = "http";
      group = "http";

      appendHttpConfig = ''
        charset utf-8;
      '';
    };

    networking.firewall.allowedTCPPorts = [ 80 443 ];
  };
}