aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-01-27 15:12:06 +0100
committerKarel Kočí <cynerd@email.cz>2023-01-27 15:12:06 +0100
commit7ad7623287c6492540c2ca55dd167f35e120e55c (patch)
tree8444d3b96008fc9506ae9f1b2e64d14938341146
parent8e6e3d387a6f9f622f1d84c444924d61069f7af3 (diff)
downloadnixos-personal-7ad7623287c6492540c2ca55dd167f35e120e55c.tar.gz
nixos-personal-7ad7623287c6492540c2ca55dd167f35e120e55c.tar.bz2
nixos-personal-7ad7623287c6492540c2ca55dd167f35e120e55c.zip
nixos/routers/wifi: update to changes in hostapd
-rw-r--r--flake.lock39
-rw-r--r--nixos/routers/wifi-adm.nix25
-rw-r--r--nixos/routers/wifi-spt.nix13
3 files changed, 35 insertions, 42 deletions
diff --git a/flake.lock b/flake.lock
index 27c19ec..379858f 100644
--- a/flake.lock
+++ b/flake.lock
@@ -93,11 +93,11 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
- "lastModified": 1674463140,
- "narHash": "sha256-l1TXSVuXDa7PJf1js1zSao8XDTxzOCim7HfrTxr7l1g=",
+ "lastModified": 1674727297,
+ "narHash": "sha256-PBQ7sv8jvQWmqxmGrmf2Pv9AuDyvl6ZRKmbE/02KlEM=",
"owner": "NixOS",
"repo": "nix",
- "rev": "90e630a542c163e4d0fa2fb28bc6e1782e4bd394",
+ "rev": "ed479aafdc03f2e7428f182549cedab947824300",
"type": "github"
},
"original": {
@@ -126,11 +126,11 @@
},
"nixos-hardware": {
"locked": {
- "lastModified": 1673803274,
- "narHash": "sha256-zaJDlHFXewT4KUsidMpRcPE+REymGH1Y3Eoc3Pjv4Xs=",
+ "lastModified": 1674550793,
+ "narHash": "sha256-ljJlIFQZwtBbzWqWTmmw2O5BFmQf1A/DspwMOQtGXHk=",
"owner": "NixOS",
"repo": "nixos-hardware",
- "rev": "7bd6b87b3712e68007823e8dd5c37ee9b114fee3",
+ "rev": "b7ac0a56029e4f9e6743b9993037a5aaafd57103",
"type": "github"
},
"original": {
@@ -186,11 +186,11 @@
},
"nixpkgs_3": {
"locked": {
- "lastModified": 1674365217,
- "narHash": "sha256-lL3qUbAr/tnt/xGk1MTc8xuOTKqErqubYha4vhjA4+g=",
+ "lastModified": 1674798626,
+ "narHash": "sha256-6qHfldrneolG+fMqUg5jpXfRYv//izZg/XzXvKiA9iU=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6c582bdf390948a6be049e81ecbab81bb160a5d3",
+ "rev": "3875a3e3e1ca2fa7e17fc45a1dbf92551f1b9db7",
"type": "github"
},
"original": {
@@ -251,14 +251,17 @@
]
},
"locked": {
- "lastModified": 1674466899,
- "narHash": "sha256-3JK5N/n0hz1pLYngi451DIPy+Bo627ceaT+4E9gFDFQ=",
- "type": "git",
- "url": "file:///home/cynerd/projects/nixturris"
+ "lastModified": 1674827761,
+ "narHash": "sha256-5A3q6pLn53e58L8rQUHHbdWmLYbL3UwFQsrCB2TFVCY=",
+ "owner": "cynerd",
+ "repo": "nixturris",
+ "rev": "e463bd9999faee79f410248084cbee8e2c229839",
+ "type": "github"
},
"original": {
- "type": "git",
- "url": "file:///home/cynerd/projects/nixturris"
+ "owner": "cynerd",
+ "repo": "nixturris",
+ "type": "github"
}
},
"personal-secret": {
@@ -350,11 +353,11 @@
},
"vpsadminos": {
"locked": {
- "lastModified": 1674346654,
- "narHash": "sha256-5bEZxGkn02ZNZ21lvfj8z3hKQN54dMKu8CfWiijXZjw=",
+ "lastModified": 1674816878,
+ "narHash": "sha256-A8FI3p4WvxJJFufu5Er1ELpeLfNGTecd3BQGBldcmP8=",
"owner": "vpsfreecz",
"repo": "vpsadminos",
- "rev": "1e370da163b34ce07b8989410a85c81393cff953",
+ "rev": "173acb299e143ff61f093bdab674cc08ecd1d9bb",
"type": "github"
},
"original": {
diff --git a/nixos/routers/wifi-adm.nix b/nixos/routers/wifi-adm.nix
index df334e5..6d7aee0 100644
--- a/nixos/routers/wifi-adm.nix
+++ b/nixos/routers/wifi-adm.nix
@@ -29,31 +29,29 @@ in {
};
config = mkIf cnf.enable {
- networking.wirelessAP = {
- enable = true;
+ services.hostapd = {
+ countryCode = "CZ";
environmentFile = "/run/secrets/hostapd.env";
interfaces =
(optionalAttrs (cnf.ar9287.interface != null) {
"${cnf.ar9287.interface}" =
- wifiAP.qualcomAtherosAR9287 {
+ hostapd.qualcomAtherosAR9287 {
channel = cnf.ar9287.channel;
- }
- // {
- bssid = "@BSSID_W24_0@";
+ bssid = "@BSSID_AR9287_0@";
ssid = "TurrisAdamkovi";
wpa = 2;
wpaPassphrase = "@PASS_TURRIS_ADAMKOVI@";
bridge = "brlan";
bss = {
"${cnf.ar9287.interface}.nela" = {
- bssid = "@BSSID_W24_1@";
+ bssid = "@BSSID_AR9287_1@";
ssid = "Nela";
wpa = 2;
wpaPassphrase = "@PASS_NELA@";
bridge = "brguest";
};
"${cnf.ar9287.interface}.milan" = {
- bssid = "@BSSID_W24_2@";
+ bssid = "@BSSID_AR9287_2@";
ssid = "MILAN-AC";
wpa = 2;
wpaPassphrase = "@PASS_MILAN_AC@";
@@ -64,26 +62,23 @@ in {
})
// (optionalAttrs (cnf.qca988x.interface != null) {
"${cnf.qca988x.interface}" =
- wifiAP.qualcomAtherosQCA988x {
+ hostapd.qualcomAtherosQCA988x {
channel = cnf.qca988x.channel;
- }
- // {
- bssid = "@BSSID_W5_0@";
- countryCode = "CZ";
+ bssid = "@BSSID_AR9287_0@";
ssid = "TurrisAdamkovi5";
wpa = 2;
wpaPassphrase = "@PASS_TURRIS_ADAMKOVI@";
bridge = "brlan";
bss = {
"${cnf.qca988x.interface}.nela" = {
- bssid = "@BSSID_W5_1@";
+ bssid = "@BSSID_AR9287_1@";
ssid = "Nela5";
wpa = 2;
wpaPassphrase = "@PASS_NELA@";
bridge = "brguest";
};
"${cnf.qca988x.interface}.milan" = {
- bssid = "@BSSID_W5_2@";
+ bssid = "@BSSID_AR9287_2@";
ssid = "MILAN-AC";
wpa = 2;
wpaPassphrase = "@PASS_MILAN_AC@";
diff --git a/nixos/routers/wifi-spt.nix b/nixos/routers/wifi-spt.nix
index 1cbb567..a7b2697 100644
--- a/nixos/routers/wifi-spt.nix
+++ b/nixos/routers/wifi-spt.nix
@@ -29,16 +29,14 @@ in {
};
config = mkIf cnf.enable {
- networking.wirelessAP = {
- enable = true;
+ services.hostapd = {
+ countryCode = "CZ";
environmentFile = "/run/secrets/hostapd.env";
interfaces =
(optionalAttrs (cnf.ar9287.interface != null) {
"${cnf.ar9287.interface}" =
- wifiAP.qualcomAtherosAR9287 {
+ hostapd.qualcomAtherosAR9287 {
channel = cnf.ar9287.channel;
- }
- // {
bssid = "@BSSID_AR9287_0@";
ssid = "TurrisRules";
wpa = 2;
@@ -57,12 +55,9 @@ in {
})
// (optionalAttrs (cnf.qca988x.interface != null) {
"${cnf.qca988x.interface}" =
- wifiAP.qualcomAtherosQCA988x {
+ hostapd.qualcomAtherosQCA988x {
channel = cnf.qca988x.channel;
- }
- // {
bssid = "@BSSID_QCA988X_0@";
- countryCode = "CZ";
ssid = "TurrisRules5";
wpa = 2;
wpaPassphrase = "@PASS_TURRIS_RULES@";