nix/hosts/laptop-server/config/networking.nix

58 lines
1.7 KiB
Nix
Raw Normal View History

2024-12-21 11:15:14 -07:00
{ pkgs, ... }:
2024-12-11 19:32:45 -07:00
{
networking = {
hostName = "ty-laptop-server";
2024-12-11 19:32:45 -07:00
2024-12-21 11:15:14 -07:00
# TODO Firewall causes issues with containers, need to fix it
firewall = {
enable = true;
2024-12-21 11:15:14 -07:00
package = pkgs.iptables;
};
# Enable NetworkManager
networkmanager = {
enable = true;
ensureProfiles = {
# secrets.entries = [
# {
# file = "/run/";
# }
# ];
profiles = {
eduroam = {
"802-1x" = {
eap = "peap;";
identity = "tyler_beckman@mines.edu";
password-flags = "1";
phase2-auth = "mschapv2";
};
connection = {
autoconnect-priority = "99";
id = "eduroam";
permissions = "user:ty:;";
type = "wifi";
};
ipv4.method = "auto";
ipv6.method = "disabled"; # I hate mines IT
wifi = {
mode = "infrastructure";
ssid = "eduroam";
};
wifi-security.key-mgmt = "wpa-eap";
};
};
};
};
};
2024-12-11 19:32:45 -07:00
# Tailscale overlay network configuration
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
openFirewall = true;
};
2024-12-21 11:15:14 -07:00
networking.firewall.trustedInterfaces = [ "tailscale0" ];
}