1
1
Fork 0

Emanote hack

main
Bill Ewanick 2024-01-14 20:45:15 -05:00
parent dc3ecc2d41
commit 62d3a137b2
2 changed files with 6 additions and 7 deletions

View File

@ -1,9 +1,10 @@
{ emanote, ... }: { pkgs, ... }:
let let
PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/ewanick.com"; PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/ewanick.com";
PORT = "5567"; PORT = "5567";
HOST = "localhost"; HOST = "localhost";
emanote-version = "1.2.0";
in in
{ {
services.caddy = { services.caddy = {
@ -22,12 +23,10 @@ in
ewanick-site = { ewanick-site = {
enable = true; enable = true;
description = "A blog powered by Emanote running solely on Markdown files."; description = "A blog powered by Emanote running solely on Markdown files.";
path = [ emanote ]; path = with pkgs; [ nix git ];
script = '' script = ''
cd ${PROJECT_ROOT} cd ${PROJECT_ROOT}
emanote run \ nix run github:srid/emanote/${emanote-version} -- run --port ${PORT} --host ${HOST}
--port ${PORT} \
--host ${HOST}
''; '';
}; };
}; };

View File

@ -2,8 +2,8 @@
let let
PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/fancyTypist.dev"; PROJECT_ROOT = "/workspace/deployed-nixos-server-and-apps/nixos-apps/fancyTypist.dev";
PORT = "12513";
HOST = "localhost"; HOST = "localhost";
PORT = 12513;
in in
{ {
services.caddy = { services.caddy = {
@ -38,7 +38,7 @@ in
"fancytypist.dev" = { "fancytypist.dev" = {
serverAliases = [ "www.fancytypist.dev" ]; serverAliases = [ "www.fancytypist.dev" ];
extraConfig = '' extraConfig = ''
reverse_proxy ${HOST}:${PORT} reverse_proxy ${HOST}:${toString PORT}
''; '';
}; };
}; };