some updates
This commit is contained in:
parent
db319ed5af
commit
6e8014e0b5
13 changed files with 153 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
44
common/networking/wireless.nix
Normal file
44
common/networking/wireless.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue