From 48724397491b978aeb061f0a9f0d0b65cb341418 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 17 Oct 2021 02:17:46 +0200 Subject: add ilztal.live --- hosts/chaski/configuration.nix | 2 ++ hosts/chaski/services/geolocation.nix | 6 ++++++ hosts/chaski/services/woitb.nix | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 hosts/chaski/services/geolocation.nix create mode 100644 hosts/chaski/services/woitb.nix (limited to 'hosts/chaski') diff --git a/hosts/chaski/configuration.nix b/hosts/chaski/configuration.nix index 7792713..22f5181 100644 --- a/hosts/chaski/configuration.nix +++ b/hosts/chaski/configuration.nix @@ -14,6 +14,8 @@ ./services/jitsi.nix ./services/uplcg.nix ./services/kontraiaa.nix + ./services/woitb.nix + ./services/geolocation.nix ./services/gtfs.nix ]; diff --git a/hosts/chaski/services/geolocation.nix b/hosts/chaski/services/geolocation.nix new file mode 100644 index 0000000..5c2c597 --- /dev/null +++ b/hosts/chaski/services/geolocation.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +{ + services.nginx.virtualHosts."ilztal.live".locations."/geolocation".root = + pkgs.copyPathToStore /home/stuebinm/Dokumente/utils/playground/web-geolocation; +} diff --git a/hosts/chaski/services/woitb.nix b/hosts/chaski/services/woitb.nix new file mode 100644 index 0000000..303ec0f --- /dev/null +++ b/hosts/chaski/services/woitb.nix @@ -0,0 +1,32 @@ +{ 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.virtualHosts."ilztal.live" = { + enableACME = true; + forceSSL = true; + locations."/".root = pkgs.copyPathToStore + /home/stuebinm/Dokumente/utils/playground/ilztal/site; + + locations."/upnext".proxyPass = "http://localhost:8000"; + locations."/geoloc".proxyPass = "http://localhost:8000"; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; + + services.nginx.appendHttpConfig = '' + access_log off; + add_header Permissions-Policy "interest-cohort=()"; + ''; +} -- cgit v1.2.3