2023-09-17 19:51:08 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2024-05-30 13:59:20 +00:00
|
|
|
name = "discord_bot";
|
|
|
|
cfg = config.services.skynet."${name}";
|
2023-09-17 19:51:08 +00:00
|
|
|
in {
|
2023-08-28 17:01:34 +00:00
|
|
|
imports = [
|
|
|
|
inputs.skynet_discord_bot.nixosModule."x86_64-linux"
|
|
|
|
];
|
|
|
|
|
2024-05-30 13:59:20 +00:00
|
|
|
options.services.skynet."${name}" = {
|
2023-08-28 17:01:34 +00:00
|
|
|
enable = mkEnableOption "Skynet LDAP backend server";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
#backups = [ "/etc/silver_ul_ical/database.db" ];
|
|
|
|
|
2023-09-17 19:51:08 +00:00
|
|
|
age.secrets.discord_token.file = ../secrets/discord/token.age;
|
|
|
|
age.secrets.discord_mail.file = ../secrets/email/details.age;
|
2023-10-27 02:01:23 +00:00
|
|
|
age.secrets.discord_wolves.file = ../secrets/wolves/details.age;
|
2023-08-28 17:01:34 +00:00
|
|
|
|
2024-05-30 13:59:20 +00:00
|
|
|
# this is what was imported
|
2023-08-28 17:01:34 +00:00
|
|
|
services.skynet_discord_bot = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
env = {
|
|
|
|
discord = config.age.secrets.discord_token.path;
|
2023-09-17 19:51:08 +00:00
|
|
|
mail = config.age.secrets.discord_mail.path;
|
2023-10-27 02:01:23 +00:00
|
|
|
wolves = config.age.secrets.discord_wolves.path;
|
2023-08-28 17:01:34 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|