pvv-nixos-config/hosts/bicep/services/calendar-bot.nix

26 lines
634 B
Nix
Raw Normal View History

2023-08-27 02:36:01 +02:00
{ config, lib, pkgs, ... }:
2023-09-08 02:23:59 +02:00
let
cfg = config.services.pvv-calendar-bot;
in {
2023-08-27 02:36:01 +02:00
sops.secrets."calendar-bot/matrix_token" = {
sopsFile = ../../../secrets/bicep/bicep.yaml;
2023-09-08 02:23:59 +02:00
key = "calendar-bot/matrix_token";
owner = cfg.user;
group = cfg.group;
2023-08-27 02:36:01 +02:00
};
services.pvv-calendar-bot = {
enable = true;
2023-09-08 02:23:59 +02:00
2023-08-27 02:36:01 +02:00
settings = {
matrix = {
homeserver = "https://matrix.pvv.ntnu.no";
user = "@bot_calendar:pvv.ntnu.no";
2023-09-08 02:23:59 +02:00
channel = "!gkNLUIhYVpEyLatcRz:pvv.ntnu.no";
2023-08-27 02:36:01 +02:00
};
secretsFile = config.sops.secrets."calendar-bot/matrix_token".path;
2023-09-12 18:23:20 +02:00
onCalendar = "*-*-* 09:00:00";
2023-08-27 02:36:01 +02:00
};
};
}