Start lorri with sytemd

Whenever possible, prefer starting things as systemd units instead of
instantiating them in ~/.profile and other dotfiles.
This commit is contained in:
William Carroll 2020-02-07 11:01:34 +00:00
parent 048b7867bf
commit 938c1a4eb0
3 changed files with 24 additions and 5 deletions

View file

@ -0,0 +1,12 @@
[Unit]
ConditionUser=!@system
Description=Lorri build daemon
After=lorri.socket
Wants=lorri.socket
[Service]
ExecStart=%h/.nix-profile/bin/lorri daemon
PrivateTmp=true
ProtectSystem=strict
Restart=on-failure
WorkingDirectory=%h

View file

@ -0,0 +1,9 @@
[Unit]
Description=Lorri build daemon
[Socket]
ListenStream=%t/lorri/daemon.socket
RuntimeDirectory=lorri
[Install]
WantedBy=sockets.target