some updates

This commit is contained in:
gwg313 2024-09-20 15:26:06 -04:00
parent db319ed5af
commit 6e8014e0b5
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
13 changed files with 153 additions and 14 deletions

View file

@ -2,8 +2,10 @@
imports = [
./zerotier.nix
./firewall.nix
./wireless.nix
];
zerotier.enable = lib.mkDefault true;
firewall.enable = lib.mkDefault true;
wireless.enable = lib.mkDefault false;
}

View file

@ -0,0 +1,44 @@
{
config,
lib,
pkgs,
...
}: {
options = {
wireless.enable = lib.mkEnableOption "Enables Wifi and adds my networks";
};
config = lib.mkIf config.wireless.enable {
sops.secrets."wireless.env" = {};
networking.wireless.enable = true;
environment.systemPackages = with pkgs; [wpa_supplicant_gui];
networking.wireless.userControlled.enable = true;
networking.wireless.environmentFile = config.sops.secrets."wireless.env".path;
networking.wireless.networks = {
"@home_uuid@" = {
psk = "@home_psk@";
priority = 99;
};
"@school_uuid@" = {
auth = ''
key_mgmt=WPA-EAP
eap=PEAP
phase2="auth=MSCHAPV2"
identity="@school_identity@"
password="@school_password@"
'';
priority = 89;
};
"eduroam" = {
auth = ''
key_mgmt=WPA-EAP
eap=PEAP
phase2="auth=MSCHAPV2"
identity="@eduroam_identity@"
password="@school_password@"
'';
priority = 79;
};
};
};
}