Wiki-js

From NixOS Wiki
Revision as of 21:54, 28 May 2024 by Klinger (talk | contribs) (Category:Server Category:Cookbook Category:Web Applications. Intro sentence with link to website)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Wiki.js is a wiki engine running on Node.js.

Cookbook

Most basic Nix to get Wiki-js running on port 3000:

 systemd.services.wiki-js = {
   requires = [ "postgresql.service" ];
   after    = [ "postgresql.service" ];
 };
 services.wiki-js = {
   enable = true;
   settings.db = {
     db  = "wiki-js";
     host = "/run/postgresql";
     type = "postgres";
     user = "wiki-js";
   };
 };
 services.postgresql = {
   enable = true;
   ensureDatabases = [ "wiki-js" ];
   ensureUsers = [{
     name = "wiki-js";
     ensureDBOwnership = true;
   }];
 };