feat: added discord bot
This commit is contained in:
commit
be4ab47ad8
6 changed files with 210 additions and 46 deletions
39
applications/discord.nix
Normal file
39
applications/discord.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.discord_bot;
|
||||
in {
|
||||
|
||||
imports = [
|
||||
inputs.skynet_discord_bot.nixosModule."x86_64-linux"
|
||||
];
|
||||
|
||||
options.services.discord_bot = {
|
||||
enable = mkEnableOption "Skynet LDAP backend server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
#backups = [ "/etc/silver_ul_ical/database.db" ];
|
||||
|
||||
age.secrets.discord_token.file = ../secrets/discord/token.age;
|
||||
age.secrets.discord_ldap.file = ../secrets/discord/ldap.age;
|
||||
|
||||
services.skynet_discord_bot = {
|
||||
enable = true;
|
||||
|
||||
env = {
|
||||
discord = config.age.secrets.discord_token.path;
|
||||
ldap = config.age.secrets.discord_ldap.path;
|
||||
};
|
||||
|
||||
discord = {
|
||||
server = "689189992417067052";
|
||||
role = {
|
||||
past = "689192357727436926";
|
||||
current = "887072218004197418";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue