nixos/applications/discord.nix

42 lines
1,011 B
Nix
Raw Normal View History

2023-08-28 17:01:34 +00:00
{ 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;
2023-09-16 19:23:54 +00:00
age.secrets.discord_mail.file = ../secrets/email/details.age;
2023-08-28 17:01:34 +00:00
services.skynet_discord_bot = {
enable = true;
env = {
discord = config.age.secrets.discord_token.path;
ldap = config.age.secrets.discord_ldap.path;
2023-09-16 19:23:54 +00:00
mail = config.age.secrets.discord_mail.path;
2023-08-28 17:01:34 +00:00
};
discord = {
server = "689189992417067052";
role = {
past = "689192357727436926";
2023-09-16 20:30:47 +00:00
current = "1152702256702030035";
2023-08-28 17:01:34 +00:00
};
};
};
};
}