(unsuccessful) attempt of running lorri daemon as user service
This commit is contained in:
parent
89a015b86f
commit
9f94ecb8d3
|
@ -287,4 +287,48 @@ in
|
||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# lorri daemon service
|
||||||
|
systemd.user = with lib; {
|
||||||
|
services.lorri = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Lorri build daemon";
|
||||||
|
Documentation = "https://github.com/target/lorri";
|
||||||
|
ConditionUser = "!@system";
|
||||||
|
Requires = "lorri.socket";
|
||||||
|
After = "lorri.socket";
|
||||||
|
RefuseManualStart = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${lorri}/bin/lorri daemon";
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
WorkingDirectory = "%h";
|
||||||
|
Restart = "on-failure";
|
||||||
|
Environment =
|
||||||
|
let
|
||||||
|
path = with pkgs; makeSearchPath "bin" [ nix gnutar git mercurial ];
|
||||||
|
in
|
||||||
|
concatStringsSep " " [
|
||||||
|
"PATH=${path}"
|
||||||
|
"RUST_BACKTRACE=1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sockets.lorri = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Socket for lorri build daemon";
|
||||||
|
};
|
||||||
|
|
||||||
|
Socket = {
|
||||||
|
ListenStream = "%t/lorri/daemon.socket";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "sockets.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue