2024-11-16 19:00:06 +05:30
|
|
|
{ lib, ... }: {
|
|
|
|
imports = [ ./wireguard.nix ];
|
|
|
|
|
2024-12-07 19:17:49 +05:30
|
|
|
systemd = {
|
|
|
|
network = {
|
|
|
|
enable = true;
|
|
|
|
wait-online = {
|
|
|
|
enable = true;
|
|
|
|
anyInterface = true;
|
|
|
|
};
|
|
|
|
networks = {
|
|
|
|
"20-virbr" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "virbr*";
|
|
|
|
Type = "bridge";
|
|
|
|
};
|
|
|
|
linkConfig = {
|
|
|
|
Unmanaged = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"21-docker" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "docker*";
|
|
|
|
Type = "bridge";
|
|
|
|
};
|
|
|
|
linkConfig = {
|
|
|
|
Unmanaged = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"22-veth" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "veth*";
|
|
|
|
Type = "ether";
|
|
|
|
};
|
|
|
|
linkConfig = {
|
|
|
|
Unmanaged = true;
|
|
|
|
};
|
|
|
|
};
|
2024-12-07 19:18:06 +05:30
|
|
|
"23-vnet" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "vnet*";
|
|
|
|
Type = "ether";
|
|
|
|
};
|
|
|
|
linkConfig = {
|
|
|
|
Unmanaged = true;
|
|
|
|
};
|
|
|
|
};
|
2024-12-07 19:17:49 +05:30
|
|
|
"40-ether" = {
|
|
|
|
enable = true;
|
|
|
|
matchConfig = {
|
|
|
|
Type = "ether";
|
|
|
|
};
|
|
|
|
networkConfig = {
|
|
|
|
DHCP = "yes";
|
2024-12-08 14:57:43 +05:30
|
|
|
Domains = [ "~." ];
|
2024-12-07 19:17:49 +05:30
|
|
|
};
|
|
|
|
dhcpV4Config = {
|
|
|
|
UseDomains = true;
|
|
|
|
RouteMetric = 100;
|
|
|
|
};
|
|
|
|
ipv6AcceptRAConfig = {
|
|
|
|
RouteMetric = 100;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"40-wireless" = {
|
|
|
|
enable = true;
|
|
|
|
matchConfig = {
|
|
|
|
Type = "wlan";
|
|
|
|
};
|
|
|
|
networkConfig = {
|
|
|
|
DHCP = "yes";
|
|
|
|
IgnoreCarrierLoss = "3s";
|
2024-12-08 14:57:43 +05:30
|
|
|
Domains = [ "~." ];
|
2024-12-07 19:17:49 +05:30
|
|
|
};
|
|
|
|
dhcpV4Config = {
|
|
|
|
UseDomains = true;
|
|
|
|
RouteMetric = 600;
|
|
|
|
};
|
|
|
|
ipv6AcceptRAConfig = {
|
|
|
|
RouteMetric = 600;
|
|
|
|
};
|
|
|
|
linkConfig = {
|
|
|
|
RequiredForOnline = "routable";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-08 14:57:43 +05:30
|
|
|
services.resolved.enable = true;
|
2023-07-20 20:40:19 +05:30
|
|
|
networking = {
|
2024-11-16 19:00:06 +05:30
|
|
|
useDHCP = lib.mkDefault false;
|
2024-12-08 14:57:43 +05:30
|
|
|
useNetworkd = true;
|
2024-07-05 00:58:38 +05:30
|
|
|
|
2024-03-23 22:03:08 +05:30
|
|
|
firewall = {
|
|
|
|
allowedTCPPorts = [
|
2024-03-31 03:11:46 +05:30
|
|
|
41414 #Torrent
|
2024-03-23 22:03:17 +05:30
|
|
|
53317 #LocalSend
|
|
|
|
];
|
|
|
|
allowedUDPPorts = [
|
2024-03-31 22:29:03 +05:30
|
|
|
6771 #Torrent
|
2024-03-31 03:11:55 +05:30
|
|
|
41414 #Torrent
|
2024-03-23 22:03:17 +05:30
|
|
|
53317 #LocalSend
|
2024-03-23 22:03:08 +05:30
|
|
|
];
|
|
|
|
};
|
2024-03-23 17:50:50 +05:30
|
|
|
|
2023-07-20 20:40:19 +05:30
|
|
|
wireless.iwd = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
General = {
|
|
|
|
AddressRandomization = "network";
|
2023-07-20 23:36:49 +05:30
|
|
|
EnableNetworkConfiguration = false;
|
2023-07-20 20:40:19 +05:30
|
|
|
};
|
|
|
|
Settings = {
|
2023-07-20 23:36:49 +05:30
|
|
|
AutoConnect = "yes";
|
2023-07-20 20:40:19 +05:30
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|