style: starting to setup the service folder
This commit is contained in:
parent
18060e87db
commit
7d2608a6e8
4 changed files with 53 additions and 34 deletions
23
services/bot_discord/tempvoc.nix
Normal file
23
services/bot_discord/tempvoc.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs
|
||||
];
|
||||
systemd.services.ticket = {
|
||||
tempvoc = {
|
||||
description = "Enium discord bot for tempvoc";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nobody";
|
||||
WorkingDirectory = "/root/tempvoc";
|
||||
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
services/bot_discord/ticket.nix
Normal file
22
services/bot_discord/ticket.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs
|
||||
];
|
||||
systemd.services.ticket = {
|
||||
description = "Service for ticket";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nobody";
|
||||
WorkingDirectory = "/root/ticket";
|
||||
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue