Add systemd unit for Bookwyrm
This commit is contained in:
parent
95802dc5c6
commit
5fb1dd3d63
1 changed files with 11 additions and 0 deletions
11
bookwyrm.nix
11
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
|
||||
'' ;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue