summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/chaski/configuration.nix2
-rw-r--r--hosts/chaski/services/geolocation.nix6
-rw-r--r--hosts/chaski/services/woitb.nix32
-rw-r--r--nix/sources.json6
4 files changed, 46 insertions, 0 deletions
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=()";
+ '';
+}
diff --git a/nix/sources.json b/nix/sources.json
index e431fbb..de07323 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -35,6 +35,12 @@
"url": "https://github.com/NixOS/nixpkgs/archive/253aecf69ed7595aaefabde779aa6449195bebb7.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "woitb": {
+ "branch": "main",
+ "repo": "https://stuebinm.eu/git/woitb",
+ "rev": "7e42f20a7beaecf2e9d40b685f1f9f5022e75a78",
+ "type": "git"
+ },
"workadventure": {
"branch": "master",
"repo": "https://stuebinm.eu/git/workadventure-nix",