Add mime type module and refactor options
This commit is contained in:
parent
3a2266d44f
commit
69fb898087
25 changed files with 641 additions and 478 deletions
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
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