summaryrefslogtreecommitdiff
path: root/hosts/chaski/services/woitb.nix
blob: a2d64a02d1d2c88bd205e02a298b4b84a8ab9dbc (plain)
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
31
32
33
34
35
36
37
38
{ config, lib, pkgs, ... }:

let
  #sources = ../../nix/sources.nix;
  sources = /home/stuebinm/Dokumente/utils/playground/ilztal/server;
in
{
  # systemd.services.woitb = {
  #   enable = true;
  #   description = "wo ist die ilztalbahn?";
  #   wantedBy = [ "multi-user.target" ];
  #   serviceConfig.type = "simple";
  #   script = "${import sources}/bin/woitb";
  # };

  services.nginx.enable = true;
  services.nginx.virtualHosts."ilztal.live" = {
    enableACME = true;
    forceSSL = true;
    locations."/".root = pkgs.copyPathToStore ./woitb;

    # locations."/upnext".proxyPass = "http://localhost:8000";
    # locations."/geoloc".proxyPass = "http://localhost:8000";
  };

  services.nginx.virtualHosts."track.ilztal.live" = {
    enableACME = true;
    forceSSL = true;
    locations."/".root = pkgs.copyPathToStore /home/stuebinm/Dokumente/utils/tracktrain;
  };

  networking.firewall.allowedTCPPorts = [ 80 443 ];

  services.nginx.appendHttpConfig = ''
     access_log off;
     add_header Permissions-Policy "interest-cohort=()";
  '';
}