2024-04-11 20:15:47 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-08-01 21:40:51 +02:00
|
|
|
let
|
|
|
|
commConfig = config.my.communications;
|
|
|
|
in
|
2023-10-22 17:12:42 +02:00
|
|
|
with lib;
|
|
|
|
{
|
2024-08-01 21:40:51 +02:00
|
|
|
options.my.communications = {
|
|
|
|
discord.enable = mkOption {
|
2023-10-22 17:12:42 +02:00
|
|
|
type = types.bool;
|
|
|
|
example = true;
|
2024-08-01 21:40:51 +02:00
|
|
|
default = false;
|
2023-10-22 17:12:42 +02:00
|
|
|
};
|
|
|
|
|
2024-08-01 21:40:51 +02:00
|
|
|
slack.enable = mkOption {
|
2023-10-22 17:12:42 +02:00
|
|
|
type = types.bool;
|
2024-08-01 21:40:51 +02:00
|
|
|
default = false;
|
|
|
|
example = false;
|
2023-10-22 17:12:42 +02:00
|
|
|
};
|
|
|
|
|
2024-08-01 21:40:51 +02:00
|
|
|
irc.enable = mkOption {
|
2023-10-22 17:12:42 +02:00
|
|
|
type = types.bool;
|
2024-08-01 21:40:51 +02:00
|
|
|
default = false;
|
2023-10-22 17:12:42 +02:00
|
|
|
example = false;
|
|
|
|
};
|
|
|
|
|
2024-08-01 21:40:51 +02:00
|
|
|
matrix-client.enable = mkOption {
|
2023-10-22 17:12:42 +02:00
|
|
|
type = types.bool;
|
2024-08-01 21:40:51 +02:00
|
|
|
default = false;
|
2023-10-22 17:12:42 +02:00
|
|
|
example = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config.home.packages = with pkgs; [
|
2024-08-01 21:40:51 +02:00
|
|
|
(mkIf commConfig.discord.enable (discord.override { nss = nss_latest; }))
|
|
|
|
(mkIf commConfig.slack.enable slack)
|
|
|
|
(mkIf commConfig.irc.enable weechat)
|
|
|
|
(mkIf commConfig.matrix-client.enable element)
|
2023-10-22 17:12:42 +02:00
|
|
|
];
|
|
|
|
}
|