21 lines
571 B
Nix
21 lines
571 B
Nix
{ 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 ];
|
|
trustedInterfaces = [ "wg0" ];
|
|
};
|
|
};
|
|
}
|