aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-11-08 21:49:52 +0100
committerKarel Kočí <cynerd@email.cz>2022-11-08 23:04:57 +0100
commit31e3c67be7d6f924d561a9300a62cb3d834d50f5 (patch)
tree05734c128a14c6f91ef003c55e53b0bcf0563f86
parent3b3e0acf77f1b22bceb6cf10eb35c33e09787047 (diff)
downloadnixos-personal-31e3c67be7d6f924d561a9300a62cb3d834d50f5.tar.gz
nixos-personal-31e3c67be7d6f924d561a9300a62cb3d834d50f5.tar.bz2
nixos-personal-31e3c67be7d6f924d561a9300a62cb3d834d50f5.zip
nixos/spt-mox: tweak wifi
-rw-r--r--common.sh2
-rw-r--r--nixos/machine/spt-mox.nix29
-rw-r--r--nixos/machine/spt-mox2.nix40
3 files changed, 22 insertions, 49 deletions
diff --git a/common.sh b/common.sh
index 797457a..9b6f48c 100644
--- a/common.sh
+++ b/common.sh
@@ -62,7 +62,7 @@ _rootssh() {
local device="$1"
local cmd="$2"
if [ "$device" != "$(hostname)" ]; then
- ssh -t "$(sshdest "$device")" sudo "sh -c '${cmd@Q}'"
+ ssh -t "$(sshdest "$device")" sudo "sh -c '${cmd}'"
else
sudo sh -c "$cmd"
fi
diff --git a/nixos/machine/spt-mox.nix b/nixos/machine/spt-mox.nix
index 5af8bff..037b10e 100644
--- a/nixos/machine/spt-mox.nix
+++ b/nixos/machine/spt-mox.nix
@@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }:
+with builtins;
with lib;
{
@@ -10,30 +11,18 @@ with lib;
enable = true;
environmentFile = "/run/secrets/hostapd.env";
interfaces = {
- #"mlan0" = {
- #countryCode = "CZ";
- #ssid = "TurrisRules";
- #wpa = true;
- #wpaPassphrase = "@PASS_TURRIS_RULES@";
- #};
- "wlp1s0" = {
+ "wlp4s0" = {
countryCode = "CZ";
- hwMode = "a";
- channel = 40;
- ieee80211ac = true;
- ht_capab = ["HT40+" "LDPC" "SHORT-GI-20" "SHORT-GI-40" "TX-STBC" "RX-STBC1" "MAX-AMSDU-7935" "DSSS_CCK-40"];
- vht_capab = ["RXLDPC" "SHORT-GI-80" "TX-STBC-2BY1" "RX-ANTENNA-PATTERN" "TX-ANTENNA-PATTERN" "RX-STBC-1" "MAX-MPDU-11454" "MAX-A-MPDU-LEN-EXP7"];
- ssid = "TurrisRules5";
+ channel = 7;
+ hwMode = "g";
+ ht_capab = ["HT40+" "SHORT-GI-20" "SHORT-GI-40" "TX-STBC" "RX-STBC1" "DSSS_CCK-40"];
+ ssid = "TurrisRules";
+ bridge = "brlan";
wpa = true;
+ wpa3 = false;
wpaPassphrase = "@PASS_TURRIS_RULES@";
- bss = {
- "wlp1s0host" = {
- ssid = "KocoviGuest";
- wpa = true;
- wpaPassphrase = "@PASS_KOCOVI@";
- };
- };
};
+ # TODO use use wlp3s0 with 80211ax
};
};
diff --git a/nixos/machine/spt-mox2.nix b/nixos/machine/spt-mox2.nix
index 79109ee..c36bbdf 100644
--- a/nixos/machine/spt-mox2.nix
+++ b/nixos/machine/spt-mox2.nix
@@ -11,43 +11,27 @@ with lib;
priority = 1;
}];
- #boot.kernelPatches = [{
- # name = "rwtm";
- # patch = null;
- # extraConfig = ''
- # TURRIS_MOX_RWTM y
- # ARMADA_37XX_RWTM_MBOX y
- # '';
- #}];
-
networking.wirelessAP = {
enable = true;
environmentFile = "/run/secrets/hostapd.env";
interfaces = {
- #"mlan0" = {
- #countryCode = "CZ";
- #ssid = "TurrisRules";
- #wpa = true;
- #wpaPassphrase = "@PASS_TURRIS_RULES@";
- #};
"wlp1s0" = {
countryCode = "CZ";
- hwMode = "a";
- channel = 40;
- ieee80211ac = true;
- ht_capab = ["HT40+" "LDPC" "SHORT-GI-20" "SHORT-GI-40" "TX-STBC" "RX-STBC1" "MAX-AMSDU-7935" "DSSS_CCK-40"];
- vht_capab = ["RXLDPC" "SHORT-GI-80" "TX-STBC-2BY1" "RX-ANTENNA-PATTERN" "TX-ANTENNA-PATTERN" "RX-STBC-1" "MAX-MPDU-11454" "MAX-A-MPDU-LEN-EXP7"];
- ssid = "TurrisRules5";
+ channel = 7;
+ hwMode = "g";
+ ht_capab = ["LDPC" "HT40+" "SHORT-GI-20" "SHORT-GI-40" "TX-STBC" "RX-STBC1" "MAX-AMSDU-7935" "DSSS_CCK-40"];
+ ssid = "TurrisRules";
bridge = "brlan";
wpa = true;
+ wpa3 = false;
wpaPassphrase = "@PASS_TURRIS_RULES@";
- bss = {
- "wlp1s0host" = {
- ssid = "KocoviGuest";
- wpa = true;
- wpaPassphrase = "@PASS_KOCOVI@";
- };
- };
+ #bss = {
+ # "wlp1s0host" = {
+ # ssid = "KocoviGuest";
+ # wpa = true;
+ # wpaPassphrase = "@PASS_KOCOVI@";
+ # };
+ #};
};
};
};