45 lines
832 B
Nix
45 lines
832 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
commConfig = config.my.communications;
|
|
in
|
|
with lib;
|
|
{
|
|
options.my.communications = {
|
|
discord.enable = mkOption {
|
|
type = types.bool;
|
|
example = true;
|
|
default = false;
|
|
};
|
|
|
|
slack.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
example = false;
|
|
};
|
|
|
|
irc.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
example = false;
|
|
};
|
|
|
|
matrix-client.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
example = false;
|
|
};
|
|
};
|
|
|
|
config.home.packages = with pkgs; [
|
|
(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)
|
|
];
|
|
}
|