feat: adding the configuration for discord bots
This commit is contained in:
parent
7d2608a6e8
commit
852eab5386
7 changed files with 130 additions and 46 deletions
26
services/bot_discord/master.nix
Normal file
26
services/bot_discord/master.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.service.bot_discord.master;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg {
|
||||
environment.systemPackages = with pkgs; [
|
||||
go
|
||||
];
|
||||
systemd.services.yagpdb = {
|
||||
description = "Enium discord master bot";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nobody";
|
||||
WorkingDirectory = "/opt/yagpdb/cmd/yagpdb";
|
||||
ExecStart = "/opt/yagpdb/cmd/yagpdb/yagpdb -all -pa";
|
||||
EnvironmentFile = "/opt/yagpdb/cmd/yagpdb/sampleenvfile";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue