From 3fdd805ba3e3c367f83548bdcd07b6f4967ac929 Mon Sep 17 00:00:00 2001 From: Bill Ewanick Date: Wed, 9 Aug 2023 19:07:15 -0400 Subject: [PATCH] Add systemd services to generate posts and run site --- nixos-apps/cutesealfanpage.love.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/nixos-apps/cutesealfanpage.love.nix b/nixos-apps/cutesealfanpage.love.nix index c92f295..ef757d3 100644 --- a/nixos-apps/cutesealfanpage.love.nix +++ b/nixos-apps/cutesealfanpage.love.nix @@ -18,13 +18,32 @@ in "cutesealfanpage.love" = { serverAliases = [ "www.cutesealfanpage.love" ]; extraConfig = '' - root * ${PROJECT_ROOT}/cutesealfanpage.love/ + root * ${PROJECT_ROOT}/cutesealfanpage.love/_site file_server ''; }; }; }; + systemd.services = { + cutesealfanpage-hakyll-site = { + enable = true; + description = "The hakyll executable that rebuilds the site when a new blog post is created."; + script = '' + nix run .#hakyll-site -- watch --no-server + ''; + }; + + cutesealfanpage-generatePosts = { + enable = true; + description = "The haskell script that creates the new post of the day."; + startAt = "08:12:42"; + script = '' + nix run .#generateSealPosts + ''; + }; + }; + # when in doubt, clear away the certs with # sudo rm -rf /var/lib/acme/ security.acme.acceptTerms = true;