2021-06-28 23:13:55 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options.programs.kdeconnect = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc ''
|
2021-06-28 23:13:55 +00: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.
|
2022-09-09 14:08:57 +00:00
|
|
|
You can use the {option}`package` to use
|
|
|
|
`gnomeExtensions.gsconnect` as an alternative
|
2023-11-16 04:20:00 +00:00
|
|
|
implementation if you use Gnome
|
2022-09-09 14:08:57 +00:00
|
|
|
'');
|
2024-01-02 11:29:13 +00:00
|
|
|
package = mkPackageOption pkgs [ "plasma5Packages" "kdeconnect-kde" ] {
|
|
|
|
example = "gnomeExtensions.gsconnect";
|
2021-06-28 23:13:55 +00: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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|