1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-21 17:01:10 +03:00
nixpkgs/nixos/modules/programs/kdeconnect.nix

30 lines
859 B
Nix
Raw Normal View History

2019-06-28 17:28:37 +02:00
{ config, pkgs, lib, ... }:
with lib;
{
options.programs.kdeconnect = {
enable = mkEnableOption (lib.mdDoc ''
2019-06-28 17:28:37 +02:00
kdeconnect.
Note that it will open the TCP and UDP port from
1714 to 1764 as they are needed for it to function properly.
You can use the {option}`package` to use
`gnomeExtensions.gsconnect` as an alternative
implementation if you use Gnome
'');
package = mkPackageOption pkgs [ "plasma5Packages" "kdeconnect-kde" ] {
example = "gnomeExtensions.gsconnect";
2019-06-28 17:28:37 +02:00
};
};
config =
let
cfg = config.programs.kdeconnect;
in
mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
networking.firewall = rec {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
allowedUDPPortRanges = allowedTCPPortRanges;
};
};
}