nixcfg/nixosModules/base/networking/default.nix

139 lines
3.1 KiB
Nix
Raw Normal View History

{
config,
inputs,
lib,
pkgs,
...
}: {
imports = [./sambaAutoMount.nix];
config = lib.mkIf config.ar.base.enable {
age.secrets.wifi.file = ../../../secrets/wifi.age;
networking.networkmanager = {
enable = true;
ensureProfiles = {
environmentFiles = [config.age.secrets.wifi.path];
profiles = {
2024-06-22 18:09:39 -04:00
"Dustin's A54" = {
connection = {
2024-06-22 18:09:39 -04:00
id = "Dustin's A54";
type = "wifi";
2024-06-22 18:09:39 -04:00
uuid = "fc221cbd-b6fd-44e0-8679-5998933b2fff";
};
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
2024-06-22 18:09:39 -04:00
psk = "$DustinsA54PSK";
};
wifi.ssid = "Dustin's A54";
};
2024-06-19 21:36:09 -04:00
javapatron = {
connection = {
id = "javapatron";
type = "wifi";
2024-06-22 18:09:39 -04:00
uuid = "bb61beaa-ec07-404c-bbce-5a08ae355de7";
};
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
};
wifi.ssid = "javapatron";
};
2024-06-19 21:36:09 -04:00
2024-06-22 18:09:39 -04:00
"Taproom Public WiFi" = {
connection = {
id = "Taproom Public WiFi";
type = "wifi";
uuid = "d79280e9-4a22-4125-9583-eb7b80abfeb6";
};
2024-06-22 18:09:39 -04:00
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
};
wifi.ssid = "Taproom Public WiFi";
2024-06-22 18:09:39 -04:00
};
Stargate-Discovery = {
connection = {
id = "Stargate-Discovery";
type = "wifi";
};
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
psk = "$StargateDiscoveryPSK";
};
wifi.ssid = "Stargate-Discovery";
};
2024-06-19 21:36:09 -04:00
2024-06-22 18:09:39 -04:00
wallace = {
connection = {
2024-06-22 18:09:39 -04:00
id = "wallace";
type = "wifi";
2024-06-22 18:09:39 -04:00
uuid = "6896b13d-9717-4a8d-8a08-2a97139bf833";
};
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
2024-06-22 18:09:39 -04:00
psk = "$wallacePSK";
};
wifi.ssid = "wallace";
};
2024-06-19 21:36:09 -04:00
WeWorkWiFi = {
"802-1x" = {
eap = "peap;";
identity = "$WeWorkWiFiIdentity";
password = "$WeWorkWiFiPassword";
phase2-auth = "mschapv2";
};
connection = {
id = "WeWorkWiFi";
type = "wifi";
};
wifi-security.key-mgmt = "wpa-eap";
wifi.ssid = "WeWorkWiFi";
};
};
};
};
services = {
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
enable = true;
addresses = true;
userServices = true;
workstation = true;
};
};
openssh = {
enable = true;
openFirewall = true;
settings.PasswordAuthentication = false;
};
printing.enable = true;
};
};
}