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 '' ; }