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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue