nixpkgs/nixos/modules/programs/kdeconnect.nix

41 lines
909 B
Nix
Raw Normal View History

{
config,
pkgs,
lib,
...
}:
2019-06-28 17:28:37 +02:00
{
options.programs.kdeconnect = {
enable = lib.mkEnableOption ''
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 = lib.mkPackageOption pkgs [ "plasma5Packages" "kdeconnect-kde" ] {
example = "gnomeExtensions.gsconnect";
2019-06-28 17:28:37 +02:00
};
};
config =
let
cfg = config.programs.kdeconnect;
in
lib.mkIf cfg.enable {
environment.systemPackages = [
cfg.package
];
networking.firewall = rec {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
2024-03-02 17:51:04 +01:00
];
allowedUDPPortRanges = allowedTCPPortRanges;
2019-06-28 17:28:37 +02:00
};
};
2019-06-28 17:28:37 +02:00
}