Modularize hardware config and remove specific nix folder
This commit is contained in:
parent
a5042bb645
commit
9ac5b25036
72 changed files with 322 additions and 100 deletions
30
modules/programs/kde_connect.nix
Normal file
30
modules/programs/kde_connect.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, options, pkgs, ... }: {
|
||||
|
||||
options.mods = {
|
||||
kde_connect.enable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Enables kde_connect.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.kde_connect.enable
|
||||
(lib.optionalAttrs (options?networking.firewall)
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; } # KDE Connect
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 1714; to = 1764; } # KDE Connect
|
||||
];
|
||||
};
|
||||
} // lib.optionalAttrs (options?home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
kdeconnect
|
||||
];
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue