dotfiles/modules/services/kdeconnect.nix

28 lines
563 B
Nix

{ config
, lib
, ...
}:
with lib;
let
ports = {
from = 1714;
to = 1764;
};
cfg = config.my.services.kdeconnect;
in
{
options.my.services.kdeconnect.enable = mkEnableOption "kdeconnect";
config = mkIf cfg.enable {
environment.persistence."/persist".users.moritz.directories = [
".config/kdeconnect"
];
home-manager.users.moritz.services.kdeconnect.enable = mkIf (!config.my.programs.gnome.enable) true;
networking.firewall = {
allowedTCPPortRanges = [ ports ];
allowedUDPPortRanges = [ ports ];
};
};
}