Move Bookwyrm systemd unit from package to NixOS module
This commit is contained in:
parent
b8e7a96248
commit
03963af59e
2 changed files with 15 additions and 11 deletions
11
bookwyrm.nix
11
bookwyrm.nix
|
@ -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
|
||||
'' ;
|
||||
}
|
||||
|
|
|
@ -51,4 +51,19 @@
|
|||
)
|
||||
] ;
|
||||
} ;
|
||||
|
||||
systemd = {
|
||||
units = {
|
||||
bookwyrm = {
|
||||
text = ''
|
||||
[Unit]
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=$out/bin/bookwyrm
|
||||
WorkingDirectory=/var/lib/bookwyrm
|
||||
'' ;
|
||||
} ;
|
||||
} ;
|
||||
} ;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue