nixpkgs/nixos/modules/programs/kdeconnect.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
909 B
Nix
Raw Normal View History

2019-06-28 17:28:37 +02:00
{
config,
pkgs,
lib,
...
}:
{
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
2019-06-28 17:28:37 +02:00
'';
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 {
2024-03-02 17:51:04 +01:00
environment.systemPackages = [
cfg.package
];
2019-06-28 17:28:37 +02:00
networking.firewall = rec {
allowedTCPPortRanges = [
{
2019-06-28 17:28:37 +02:00
from = 1714;
to = 1764;
}
2024-03-02 17:51:04 +01:00
];
2019-06-28 17:28:37 +02:00
allowedUDPPortRanges = allowedTCPPortRanges;
};
};
2019-06-28 17:28:37 +02:00
}