nixos-config/modules/workstation/home-manager/communication.nix
2024-08-01 21:40:51 +02:00

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)
];
}