openttd: init service
This commit is contained in:
parent
79cce640d5
commit
77663c229f
3 changed files with 27 additions and 0 deletions
23
services/openttd.nix
Normal file
23
services/openttd.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
openttd
|
||||
];
|
||||
|
||||
systemd.user.services.openttd = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit.Description = "OpenTTD Tmux server";
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux new -s OpenTTD -d '${pkgs.openttd}/bin/openttd -D'";
|
||||
ExecStop = "${pkgs.tmux}/bin/tmux kill-server";
|
||||
Restart = "on-failure";
|
||||
Type = "forking";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue