{ config, lib, pkgs, inputs, ... }: { services.nginx.virtualHosts."tracktrain.stuebinm.eu" = { locations."/" = { proxyPass = "http://localhost:4000"; proxyWebsockets = true; }; enableACME = true; forceSSL = true; }; networking.firewall.allowedTCPPorts = [ 443 ]; systemd.services.tracktrain = { enable = true; description = "tracks trains, hopefully"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; serviceConfig.Type = "simple"; path = [ pkgs.wget ]; script = '' cd /tmp wget "https://ilztalbahn.eu/wp-content/uploads/2020/07/gtfs.zip" ${import inputs.tracktrain {nixpkgs = pkgs;}}/bin/haskell-gtfs ''; startAt = "daily"; }; }