systemctl status's Docs: line now leads to the README, at a profile path that survives upgrades, and, for a build from a clean tree, to the commit's source on git.inference.coop. The version ends in the short rev (-dirty for a dirty tree), and share/doc/diigo-cache/REVISION holds the full one. pnpmDeps keeps version 0.0.0, so a new commit doesn't refetch the deps. Generated-by: Claude Opus 5.5
34 lines
1.2 KiB
Desktop File
34 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=diigo-cache and webapp (workerd)
|
|
# the profile's README, and the commit's source (a clean build's only)
|
|
Documentation=file:///nix/var/nix/profiles/diigo-cache/share/doc/diigo-cache/README.md @source@
|
|
Requires=diigo-cache.socket
|
|
|
|
[Service]
|
|
# the profile path survives upgrades; see doc/install.md
|
|
ExecStart=/nix/var/nix/profiles/diigo-cache/bin/diigo-cache-serve -S http=3 -d cache-state=/var/lib/diigo-cache/cache -d webapp-state=/var/lib/diigo-cache/webapp
|
|
DynamicUser=yes
|
|
StateDirectory=diigo-cache diigo-cache/cache diigo-cache/webapp
|
|
StateDirectoryMode=0700
|
|
# webapp fetches diigo.com; nothing else needs the network
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectKernelModules=yes
|
|
ProtectControlGroups=yes
|
|
RestrictNamespaces=yes
|
|
LockPersonality=yes
|
|
CapabilityBoundingSet=
|
|
SystemCallFilter=@system-service
|
|
# V8 uses memory protection keys; without these, SIGSYS at startup
|
|
SystemCallFilter=pkey_alloc pkey_mprotect pkey_free
|
|
# not MemoryDenyWriteExecute: V8's JIT needs W+X
|
|
|
|
[Install]
|
|
# started at boot, not only on the first request: workerd runs the
|
|
# caches' refresh alarms only while it is up
|
|
WantedBy=multi-user.target
|