feat(kdeconnect): init
This commit is contained in:
21
modules/nixos/kdeconnect.nix
Normal file
21
modules/nixos/kdeconnect.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.sydnix.kdeconnect;
|
||||
in {
|
||||
options.sydnix.kdeconnect = {
|
||||
enable = lib.mkEnableOption "KDE Connect";
|
||||
openFirewall = lib.mkOption {
|
||||
description = ''Open required ports for KDE Connect'';
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable
|
||||
(let
|
||||
port-range = lib.optional cfg.openFirewall { from = 1714; to = 1764; };
|
||||
in {
|
||||
networking.firewall.allowedTCPPortRanges = port-range;
|
||||
networking.firewall.allowedUDPPortRanges = port-range;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user