feat(discord/tut): added the discord tut
This commit is contained in:
parent
3bea500dc0
commit
89120d940b
5 changed files with 55 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.service.bot_discord.bde;
|
||||
cfg = config.service.bot_discord.ada;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg {
|
||||
|
|
|
|||
39
services/bot_discord/bot_loc.nix
Normal file
39
services/bot_discord/bot_loc.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.service.bot_discord.tut;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg {
|
||||
users = {
|
||||
groups.dsc_loc = {
|
||||
name = "dsc_loc";
|
||||
};
|
||||
users.dsc_loc = {
|
||||
description = "Utilisateur pour le bot tut";
|
||||
group = "dsc_loc";
|
||||
home = "/opt/alerte_poste-master";
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.bot_loc = {
|
||||
description = "loc discord bot public";
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "dsc_loc";
|
||||
WorkingDirectory = "/opt/alerte_poste-master";
|
||||
ExecStart = "/opt/alerte_poste-master/.venv/bin/python /opt/alerte_poste-master/src/main.py";
|
||||
EnvironmentFile = "/opt/alerte_poste-master/.env";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -13,6 +13,9 @@ let
|
|||
ada_bot = import ./bot_discord/ada.nix {
|
||||
inherit config pkgs lib;
|
||||
};
|
||||
tut_bot = import ./bot_discord/bot_loc.nix {
|
||||
inherit config pkgs lib;
|
||||
};
|
||||
bde_bot = import ./bot_discord/bde.nix {
|
||||
inherit config pkgs lib;
|
||||
};
|
||||
|
|
@ -28,6 +31,7 @@ in
|
|||
imports = [
|
||||
ada_bot
|
||||
bde_bot
|
||||
tut_bot
|
||||
master_bot
|
||||
music_bot
|
||||
tempvoc_bot
|
||||
|
|
@ -46,10 +50,15 @@ in
|
|||
default = false;
|
||||
description = "Enable ada bot";
|
||||
};
|
||||
tut = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "enable tut bot";
|
||||
};
|
||||
bde = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable bde bot";
|
||||
description = "enable bde bot";
|
||||
};
|
||||
marty = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ in
|
|||
targets = [
|
||||
"https://raphael.parodi.pro"
|
||||
"https://nextcloud.enium.eu"
|
||||
"https://htop.enium.eu"
|
||||
"https://monitor.enium.eu"
|
||||
"https://relance-pas-stp.me:4242"
|
||||
];
|
||||
}];
|
||||
relabel_configs = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue