2021-06-28 23:13:55 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
options.programs.kdeconnect = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption ''
|
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
|
2024-04-21 15:54:59 +00:00
|
|
|
'';
|
2024-05-15 15:35:15 +00:00
|
|
|
package = lib.mkPackageOption pkgs [ "plasma5Packages" "kdeconnect-kde" ] {
|
2024-01-02 11:29:13 +00:00
|
|
|
example = "gnomeExtensions.gsconnect";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.programs.kdeconnect;
|
|
|
|
in
|
2024-05-15 15:35:15 +00:00
|
|
|
lib.mkIf cfg.enable {
|
2024-04-21 15:54:59 +00:00
|
|
|
environment.systemPackages = [
|
|
|
|
cfg.package
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
networking.firewall = rec {
|
|
|
|
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
|
|
|
allowedUDPPortRanges = allowedTCPPortRanges;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|