current
 1{
 2  flake.modules.nixos.desktop = _: {
 3    networking.firewall = {
 4      allowedTCPPortRanges = [
 5        {
 6          from = 1714;
 7          to = 1764;
 8        }
 9      ];
10      allowedUDPPortRanges = [
11        {
12          from = 1714;
13          to = 1764;
14        }
15      ];
16    };
17  };
18
19  flake.modules.homeManager.desktop = {osConfig, ...}: let
20    isPlasma = osConfig.services.desktopManager.plasma6.enable;
21    isNoctalia = osConfig.services.noctalia-shell.enable or false;
22  in {
23    services.kdeconnect = {
24      enable = true;
25      # If using Plasma, KDE Connect has integrated indicator.
26      # If using Noctalia, a KDE Connect widget plugin is available, so no indicator is needed.
27      indicator = !isPlasma && !isNoctalia;
28    };
29  };
30}