From ff641f54124bade2e9d56ff9108a4be46d9aa4e2 Mon Sep 17 00:00:00 2001 From: Grey Jones Date: Mon, 7 Sep 2026 01:17:58 +0100 Subject: [PATCH] add kdeconnect as a service config --- modules/features/services/kdeconnect.nix | 24 ++++++++++++++++++++++++ modules/hosts/kitagawa/kitagawa.nix | 5 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 modules/features/services/kdeconnect.nix diff --git a/modules/features/services/kdeconnect.nix b/modules/features/services/kdeconnect.nix new file mode 100644 index 0000000..41346dc --- /dev/null +++ b/modules/features/services/kdeconnect.nix @@ -0,0 +1,24 @@ +{ inputs, ... }: let + optionName = "features.services.kdeconnect.enable"; +in { + imports = [ (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "KDE Connect") ]; + + flake.nixosModules.graphics = { config, lib, ... }: { + imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {}) ]; + + config = lib.mkIf (config.features.services.kdeconnect.enable) { + networking.firewall.allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + }; + }; + + flake.homeModules.graphics = { config, lib, ... }: { + imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } { + services.kdeconnect.enable = true; + }) ]; + }; +} diff --git a/modules/hosts/kitagawa/kitagawa.nix b/modules/hosts/kitagawa/kitagawa.nix index 62a7f69..ec2f238 100644 --- a/modules/hosts/kitagawa/kitagawa.nix +++ b/modules/hosts/kitagawa/kitagawa.nix @@ -28,6 +28,10 @@ shells.zsh.antidote.enable = true; + services = { + kdeconnect.enable = true; + }; + applications = { gui = { nautilus.enable = true; @@ -104,7 +108,6 @@ jetbrains.idea xarchiver kdePackages.kate - kdePackages.kdeconnect-kde loupe sshfs ];