1
1
Fork 0

Add systemd services to generate posts and run site

main
Bill Ewanick 2023-08-09 19:07:15 -04:00
parent 61947907ce
commit a61e5e6b68
1 changed files with 20 additions and 1 deletions

View File

@ -18,13 +18,32 @@ in
"cutesealfanpage.love" = { "cutesealfanpage.love" = {
serverAliases = [ "www.cutesealfanpage.love" ]; serverAliases = [ "www.cutesealfanpage.love" ];
extraConfig = '' extraConfig = ''
root * ${PROJECT_ROOT}/cutesealfanpage.love/ root * ${PROJECT_ROOT}/cutesealfanpage.love/_site
file_server 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 # when in doubt, clear away the certs with
# sudo rm -rf /var/lib/acme/ # sudo rm -rf /var/lib/acme/
security.acme.acceptTerms = true; security.acme.acceptTerms = true;