Move Bookwyrm systemd unit from package to NixOS module

This commit is contained in:
Reinout Meliesie 2025-03-04 12:19:47 +01:00
parent b8e7a96248
commit 03963af59e
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
2 changed files with 15 additions and 11 deletions

View file

@ -116,17 +116,6 @@ mkDerivation {
chmod +x $out/bin/bookwyrm
# Systemd units
cat <<- EOF > $out/lib/systemd/system/bookwyrm.service
[Unit]
After=network.target
[Service]
ExecStart=$out/bin/bookwyrm
WorkingDirectory=/var/lib/bookwyrm
EOF
runHook postInstall
'' ;
}

View file

@ -51,4 +51,19 @@
)
] ;
} ;
systemd = {
units = {
bookwyrm = {
text = ''
[Unit]
After=network.target
[Service]
ExecStart=$out/bin/bookwyrm
WorkingDirectory=/var/lib/bookwyrm
'' ;
} ;
} ;
} ;
}