Specify wifi priorities for each machine based on location

This commit is contained in:
Haak Saxberg 2023-01-28 22:48:45 -08:00
parent 6da45dc7bd
commit 32421372e4
2 changed files with 16 additions and 5 deletions

View file

@ -20,17 +20,13 @@ in
networking.wireless.networks."ShamblingHalfling 5Ghz-1" = { networking.wireless.networks."ShamblingHalfling 5Ghz-1" = {
pskRaw = ( pskRaw = (
(import ../system/framework/keys.nix).wifi."ShamblingHalfling 5Ghz-1".pskRaw (import ../system/framework/keys.nix).wifi."ShamblingHalfling 5Ghz-1".pskRaw
); );
priority = 1;
}; };
networking.wireless.networks.N904 = { networking.wireless.networks.N904 = {
pskRaw = ( pskRaw = (
(import ../system/framework/keys.nix).wifi.N904.pskRaw (import ../system/framework/keys.nix).wifi.N904.pskRaw
); );
priority = 2;
}; };
@ -76,9 +72,17 @@ in
deployment.targetHost = "192.168.1.65"; deployment.targetHost = "192.168.1.65";
imports = [ ../system/xps11/configuration.nix ]; imports = [ ../system/xps11/configuration.nix ];
networking.wireless.networks."ShamblingHalfling 5Ghz-1" = {
priority = 2;
};
networking.wireless.networks.N904 = {
priority = 1;
};
fileSystems."/storage" = { fileSystems."/storage" = {
device = "${nasIp}:/storage"; device = "${nasIp}:/storage";
fsType = "nfs"; fsType = "nfs";
options = [ "x-systemd.automount" "noauto" "_netdev" ];
}; };
}; };
@ -91,6 +95,13 @@ in
../home/programs/flood ../home/programs/flood
]; ];
networking.wireless.networks."ShamblingHalfling 5Ghz-1" = {
priority = 1;
};
networking.wireless.networks.N904 = {
priority = 2;
};
services.nfs.server.enable = true; services.nfs.server.enable = true;
services.nfs.server.exports = '' services.nfs.server.exports = ''
/export 192.168.1.0/24(insecure,rw,sync,crossmnt,no_subtree_check,fsid=0) /export 192.168.1.0/24(insecure,rw,sync,crossmnt,no_subtree_check,fsid=0)

View file

@ -29,7 +29,7 @@
fileSystems."/storage" = { fileSystems."/storage" = {
device = "192.168.1.168:/storage"; device = "192.168.1.168:/storage";
fsType = "nfs"; fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ]; options = [ "x-systemd.automount" "noauto" "_netdev" ];
}; };
swapDevices = swapDevices =