system/modules/nixos/programs/communication/simplex-chat.nix

21 lines
534 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
let
cfg = config.local.programs.communication.simplex-chat;
in
{
options.local.programs.communication.simplex-chat = with lib; {
enable = mkEnableOption "SimplexChat";
package = mkPackageOption pkgs "simplex-chat-desktop" { };
openFirewall = mkEnableOption "Open firewall to link mobile device";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
networking.firewall = lib.mkIf cfg.openFirewall {
allowedTCPPorts = [ 44000 ];
};
};
}