From 424afe3c83c12ba7b94d0168b9a37724492d08d1 Mon Sep 17 00:00:00 2001 From: MoritzBoehme Date: Mon, 8 Nov 2021 15:44:21 +0100 Subject: [PATCH] add firewall exceptions for kdeconnect --- modules/services/default.nix | 4 +--- modules/services/kdeconnect.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 modules/services/kdeconnect.nix diff --git a/modules/services/default.nix b/modules/services/default.nix index d05d9b2..26cf3a4 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,9 +1,7 @@ { config, lib, pkgs, ... }: { - imports = [ ./dunst ./agenix.nix ./diskstation ./picom.nix ]; - - home-manager.users.moritz.services = { kdeconnect.enable = true; }; + imports = [ ./dunst ./agenix.nix ./diskstation ./picom.nix ./kdeconnect.nix ]; services = { printing.enable = true; diff --git a/modules/services/kdeconnect.nix b/modules/services/kdeconnect.nix new file mode 100644 index 0000000..d12b5d7 --- /dev/null +++ b/modules/services/kdeconnect.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: +let + ports = { + from = 1714; + to = 1764; + }; +in { + home-manager.users.moritz.services = { kdeconnect.enable = true; }; + networking.firewall = { + allowedTCPPortRanges = [ ports ]; + allowedUDPPortRanges = [ ports ]; + }; +}