nix-config/hosts/toaster/network/default.nix

72 lines
1.3 KiB
Nix
Raw Normal View History

2025-02-18 09:54:31 +01:00
{ lib, pkgs, ... }:
{
2025-01-03 19:06:42 +01:00
imports = [
./mullvad.nix
./dumpdvb.nix
./zw.nix
];
2025-02-18 09:54:31 +01:00
environment.systemPackages = with pkgs; [
iwgtk
impala
];
2025-01-03 19:06:42 +01:00
2025-01-24 22:42:28 +01:00
# kick out networkmanager
networking.networkmanager.enable = lib.mkForce false;
networking.useNetworkd = true;
systemd.network.enable = true;
2025-01-03 19:06:42 +01:00
2025-01-11 03:55:19 +01:00
networking = {
hostName = "toaster";
firewall.enable = true;
wireguard.enable = true;
2025-01-24 22:42:28 +01:00
wireless.iwd.enable = true;
2025-01-11 03:55:19 +01:00
};
2025-01-11 03:55:19 +01:00
services.resolved = {
enable = true;
2025-02-15 16:38:10 +01:00
dnssec = "false";
2025-01-11 03:55:19 +01:00
fallbackDns = [
"9.9.9.9"
"2620:fe::fe"
"149.112.112.112"
"2620:fe::9"
];
};
2025-01-03 19:06:42 +01:00
2025-01-24 22:42:28 +01:00
# we might have no interwebs at all
systemd.network.wait-online.enable = false;
# uplinks
systemd.network.networks = {
"10-ether-uplink" = {
matchConfig.Name = "enp1s0f0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
"10-dock-uplink" = {
matchConfig.Name = "enp5s0f4u1u1";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
2025-02-18 09:54:31 +01:00
dhcpV4Config = {
RouteMetric = 666;
};
dhcpV6Config = {
RouteMetric = 666;
};
2025-01-24 22:42:28 +01:00
};
"wlan-uplink" = {
matchConfig.Name = "wlan0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
};
2025-01-11 03:55:19 +01:00
}