nixcfg/nixosModules/base/networking/default.nix

99 lines
2.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
config,
inputs,
lib,
pkgs,
...
}: {
config = lib.mkIf config.alyraffauf.base.enable {
age.secrets.wifi.file = ../../../secrets/wifi.age;
hardware = {
bluetooth.enable = true;
};
networking.networkmanager = {
enable = true;
ensureProfiles = {
environmentFiles = [
config.age.secrets.wifi.path
];
profiles = {
Stargate-Discovery = {
connection = {
id = "Stargate-Discovery";
type = "wifi";
};
wifi.ssid = "Stargate-Discovery";
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
psk = "$StargateDiscoveryPSK";
};
};
wattson = {
connection = {
id = "wattson";
type = "wifi";
};
wifi.ssid = "wattson";
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
psk = "$wattsonPSK";
};
};
"Dustins iPhone" = {
connection = {
id = "Dustins iPhone";
type = "wifi";
};
wifi.ssid = "Dustins iPhone";
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
psk = "$DustinsiPhonePSK";
};
};
WeWorkWiFi = {
"802-1x" = {
eap = "peap;";
identity = "$WeWorkWiFiIdentity";
password = "$WeWorkWiFiPassword";
phase2-auth = "mschapv2";
};
connection = {
id = "WeWorkWiFi";
type = "wifi";
};
wifi.ssid = "WeWorkWiFi";
wifi-security.key-mgmt = "wpa-eap";
};
};
};
};
services = {
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
enable = true;
addresses = true;
userServices = true;
workstation = true;
};
};
openssh = {
enable = true;
openFirewall = true;
};
printing.enable = true;
};
};
}