feat(discord): adding the bde bot
This commit is contained in:
parent
6e2d489667
commit
9b5e8eed29
3 changed files with 60 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
|||
};
|
||||
bot_discord = {
|
||||
master = true;
|
||||
bde = true;
|
||||
music = true;
|
||||
tempvoc = true;
|
||||
ticket = true;
|
||||
|
|
@ -30,8 +31,25 @@
|
|||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users = {
|
||||
axel = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "Feuyllelpb12341234";
|
||||
description = "feuylle";
|
||||
useDefaultShell = true;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"plugdev"
|
||||
"docker"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
|
|
|||
33
services/bot_discord/bde.nix
Normal file
33
services/bot_discord/bde.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.service.bot_discord.bde;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix
|
||||
];
|
||||
systemd.services.bot_bde = {
|
||||
description = "BDE discord bot public";
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "nobody";
|
||||
WorkingDirectory = "/opt/Bot_Auth";
|
||||
ExecStart = "/opt/Bot_Auth/.venv/bin/python /opt/Bot_Auth/bot.py";
|
||||
EnvironmentFile = "/opt/Bot_Auth/.env";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
Environment = lib.mkForce ''
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -10,6 +10,9 @@ let
|
|||
tempvoc_bot = import ./bot_discord/tempvoc.nix {
|
||||
inherit config pkgs lib;
|
||||
};
|
||||
bde_bot = import ./bot_discord/bde.nix {
|
||||
inherit config pkgs lib;
|
||||
};
|
||||
ticket_bot = import ./bot_discord/ticket.nix {
|
||||
inherit config pkgs lib;
|
||||
};
|
||||
|
|
@ -21,6 +24,7 @@ in
|
|||
music_bot
|
||||
tempvoc_bot
|
||||
ticket_bot
|
||||
bde_bot
|
||||
];
|
||||
|
||||
options.service.bot_discord = {
|
||||
|
|
@ -29,6 +33,11 @@ in
|
|||
default = false;
|
||||
description = "Enable master bot";
|
||||
};
|
||||
bde = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable bde bot";
|
||||
};
|
||||
music = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue