{pkgs, ...}: let PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/fancyTypist.dev"; HOST = "localhost"; PORT = 12513; in { services.caddy = { enable = true; virtualHosts = { "fancytypist.com" = { serverAliases = ["www.fancytypist.com"]; extraConfig = '' respond "Hello, world! fancytypist.com" ''; }; "fancytypist.ca" = { serverAliases = ["www.fancytypist.ca"]; extraConfig = '' respond "Hello, world! fancytypist.ca" ''; }; "osds.fancytypist.ca" = { extraConfig = '' respond "Welcome to the Ottawa Swing Dance Society" ''; }; "osds.fancytypist.dev" = { serverAliases = ["osds.fancytypist.dev"]; extraConfig = '' reverse_proxy ${HOST}:${toString PORT} ''; }; }; }; systemd.services = { fancyTypistDotDev-site = { enable = false; description = "The Haskell Servant executable server that hosts my FancyTypist.dev site."; path = with pkgs; [ nix git ]; script = '' cd ${PROJECT_ROOT} nix run .#fancyTypistDotDev-site ''; }; }; services.lemmy = { enable = true; settings = { hostname = "helpme.fancytypist.ca"; database.createLocally = true; }; caddy.enable = true; }; }