about summary refs log tree commit diff
path: root/hosts/carmel/services.nix
blob: 3c9662f4a5834a2cc7dcea8acd2e843ae8550a97 (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
{ config, pkgs, ... }: {
  my.services = {
    monitoring = {
      node-exporter.enable = true;
      promtail.enable = true;
    };
  };

  services.nginx = {
    streamConfig = ''
      server {
        listen 443;
        proxy_timeout 2s;
        proxy_pass 192.168.0.40:443;
      }

      server {
        listen 80 reuseport;
        proxy_timeout 2s;
        proxy_pass 192.168.0.40:80;
      }
    '';
  };
  networking.firewall.allowedTCPPorts = [ 80 443 ];
}