From 5fb1dd3d63d386feb18814f1352a315d3ac53501 Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Tue, 4 Mar 2025 11:13:29 +0100 Subject: [PATCH] Add systemd unit for Bookwyrm --- bookwyrm.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bookwyrm.nix b/bookwyrm.nix index adb287a..87e226f 100644 --- a/bookwyrm.nix +++ b/bookwyrm.nix @@ -116,6 +116,17 @@ mkDerivation { chmod +x $out/bin/bookwyrm + # Systemd units + + cat <<- EOF > $out/etc/systemd/system/bookwyrm.service + [Unit] + After=network.target + + [Service] + ExecStart=$out/bin/bookwyrm + WorkingDirectory=/var/lib/bookwyrm + EOF + runHook postInstall '' ; }