{ config, lib, pkgs, ... }: { systemd.services.bahnhof-name = { enable = true; wantedBy = [ "multi-user.target" ]; serviceConfig.Type = "simple"; serviceConfig.Restart = "always"; serviceConfig.MemoryMax = "1G"; path = [ pkgs.bahnhof-name ]; script = '' cd ${pkgs.bahnhof-name.outPath} bin/bahnhof-name ''; }; services.nginx.virtualHosts = let vhost = { enableACME = true; forceSSL = true; locations."/".proxyPass = "http://localhost:8080"; }; in builtins.listToAttrs (map (name: { inherit name; value = vhost; }) ["bahnhof.name" "ril100.bahnhof.name" "ds100.bahnhof.name" "leitpunkt.bahnhof.name"]); }