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 ];