Deploy NPM Package Manager (NPM) packages with the Nix package manager.
node2nix -18
nix-build -A package
result -> /nix/store/q52r74372s17xc9kybya84c251q1c3zj-wiki-0.33.0/
wiki.nix @wiki.ralfbarkow.ch
systemd.services.wiki = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; description = "Federated Wiki (Node.js server version)"; serviceConfig = { Type = "simple"; User = "rgb"; # /nix/store/ivkarn12ik9ph0wdy8978yaz4ilf55bb-node_wiki-0.27.0 # /nix/store/slqw5nwaz3gv8ifgg0xpj5v0qy902c1p-node_wiki-0.28.1 # /nix/store/gn0rv30xzh6rn8s9azjww2zdsh7s5x6b-wiki-0.30.0/ # /nix/store/9wqk0wkyv2ilrjx76y17y4aqbrfh7spx-wiki-0.31.0/ # /nix/store/m3lxz0v7s6xrcqlgr5j4m52h97814isj-wiki-0.32.1/ # result -> /nix/store/q52r74372s17xc9kybya84c251q1c3zj-wiki-0.33.0/ q52r74372s17xc9kybya84c251q1c3zj-wiki-0.33.0 ExecStart = "/nix/store/q52r74372s17xc9kybya84c251q1c3zj-wiki-0.33.0/bin/wiki --config /home/rgb/.wiki/config.json"; Restart = "on-failure"; };
ssh root@…
nixos-rebuild test
systemctl restart wiki
journalctl -r -u wiki
nixos-rebuild switch
~