nixos-config/hosts/thinkpad/modules/networks/default.nix

32 lines
701 B
Nix
Raw Normal View History

{ config, ... }:
{
imports = [ ./uni.nix ];
2022-12-29 20:50:01 +01:00
sops.secrets."wireless-env" = { };
networking = {
hostName = "thinkpad";
firewall = {
allowedUDPPorts = [ 51820 ]; # used for wireguard
checkReversePath = false;
};
wireless = {
enable = true;
userControlled.enable = true;
environmentFile = config.sops.secrets."wireless-env".path;
networks = {
"@HOME_SSID@" = {
psk = "@HOME_PSK@";
authProtocols = [ "WPA-PSK" ];
};
"@DORM_SSID@" = {
psk = "@DORM_PSK@";
authProtocols = [ "WPA-PSK" ];
2022-12-29 20:25:07 +01:00
extraConfig = ''
disabled=1
'';
};
};
};
};
}