1
1

Add fancyTypist.dev test Servant site

This commit is contained in:
2023-10-08 12:13:38 -04:00
parent 5c4ad7657b
commit 2d83fae67f
3 changed files with 22 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
let
PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/fancytypist.dev";
PORT = "12513";
HOST = "localhost";
in
{
services.caddy = {
enable = true;
@@ -19,9 +24,21 @@
"fancytypist.dev" = {
serverAliases = [ "www.fancytypist.dev" ];
extraConfig = ''
respond "Hello, world! fancytypist.dev"
reverse_proxy ${HOST}:${PORT}
'';
};
};
};
systemd.services = {
fancyTypist.dev-site = {
enable = true;
description = "The Haskell Servant executable server that hosts my FancyTypist.dev site.";
path = with pkgs; [ nix git ];
script = ''
cd ${PROJECT_ROOT}
nix run .#fancyTypist.dev-site
'';
};
};
}