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
|
|
@ -1,11 +1,20 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../global.nix
|
||||
./hardware-configuration.nix
|
||||
../../services/discord.nix
|
||||
];
|
||||
|
||||
service = {
|
||||
bot_discord = {
|
||||
master = true;
|
||||
music = true;
|
||||
tempvoc = true;
|
||||
ticket = true;
|
||||
};
|
||||
};
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
|
@ -19,37 +28,6 @@
|
|||
wireless.enable = false;
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
music = {
|
||||
description = "Enium discord bot for music";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nobody";
|
||||
WorkingDirectory = "/root/music";
|
||||
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
yagpdb = {
|
||||
description = "Enium discord master bot";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nobody";
|
||||
WorkingDirectory = "/root/yagpdb/cmd/yagpdb";
|
||||
ExecStart = "/root/yagpdb/cmd/yagpdb/yagpdb -all -pa";
|
||||
EnvironmentFile = "/root/yagpdb/cmd/yagpdb/sampleenvfile";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
dconf
|
||||
fastfetch
|
||||
git
|
||||
go
|
||||
home-manager
|
||||
lego
|
||||
libjpeg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue