fieldpoc/docs/extension/nerd.md

25 lines
683 B
Markdown
Raw Permalink Normal View History

2023-10-14 21:09:26 +02:00
# Nerd web interface
Nerd is a web interface for managing extensions.
Source code: <https://github.com/dect-e/nerd/>
## Sync extensions to FieldPOC
Nerd has an HTTP endpoint generation a FieldPOC compatible extensions file.
You can adopt the follwing NixOS configuration snipped.
It downloads the JSON file, copies it to the location FieldPOC expects the extensions and reload FieldPOC.
```
systemd.services.fieldpoc-nerd = {
wantedBy = ["multi-user.target"];
startAt = "*-*-* *:*:00";
script = ''
2023-10-14 21:09:26 +02:00
${pkgs.curl}/bin/curl https://nerd.example.com/export.json\?event=1 > /etc/fieldpoc/extensions.json
${pkgs.curl}/bin/curl --json '{}' http://127.0.0.1:9437/reload
2023-10-14 21:09:26 +02:00
'';
};
```