2020-05-12 16:06:45 +04:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
let
|
|
|
|
localRanges = [
|
|
|
|
{ from = 1714; to = 1764; } # KDE connect
|
|
|
|
{ from = 6600; to = 6600; } # Mopidy
|
|
|
|
];
|
|
|
|
in {
|
2020-02-17 17:00:59 +04:00
|
|
|
networking = {
|
|
|
|
networkmanager.enable = true;
|
|
|
|
firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowedTCPPorts = [ 13748 13722 5000 22 80 443 ];
|
2020-05-12 16:06:45 +04:00
|
|
|
interfaces.wlan0.allowedTCPPortRanges = localRanges;
|
|
|
|
interfaces.wlan0.allowedUDPPortRanges = localRanges;
|
|
|
|
interfaces.eth0.allowedUDPPortRanges = localRanges;
|
|
|
|
interfaces.eth0.allowedTCPPortRanges = localRanges;
|
2020-02-17 17:00:59 +04:00
|
|
|
};
|
|
|
|
resolvconf.extraConfig = ''
|
|
|
|
local_nameservers=""
|
|
|
|
name_server_blacklist="0.0.0.0 127.0.0.1"
|
|
|
|
resolv_conf_local_only=NO
|
|
|
|
'';
|
|
|
|
usePredictableInterfaceNames = false;
|
|
|
|
hostName = config.device;
|
|
|
|
};
|
|
|
|
systemd.services.ModemManager.wantedBy =
|
|
|
|
lib.optional (config.device == "ThinkPad-Laptop") "network.target";
|
|
|
|
|
|
|
|
}
|