aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/spt-mox2.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-02-21 21:54:09 +0100
committerKarel Kočí <cynerd@email.cz>2022-06-10 14:05:48 +0200
commit93b0545d11bf8c7f065203f7f3eaf1d0e3730dce (patch)
treeda93fa5fcd14c493d8ccd86c98f40d26c9697869 /nixos/machine/spt-mox2.nix
downloadnixos-personal-93b0545d11bf8c7f065203f7f3eaf1d0e3730dce.tar.gz
nixos-personal-93b0545d11bf8c7f065203f7f3eaf1d0e3730dce.tar.bz2
nixos-personal-93b0545d11bf8c7f065203f7f3eaf1d0e3730dce.zip
Add initial version
Diffstat (limited to 'nixos/machine/spt-mox2.nix')
-rw-r--r--nixos/machine/spt-mox2.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/nixos/machine/spt-mox2.nix b/nixos/machine/spt-mox2.nix
new file mode 100644
index 0000000..ed6a028
--- /dev/null
+++ b/nixos/machine/spt-mox2.nix
@@ -0,0 +1,78 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ config = {
+
+ #boot.kernelPatches = [{
+ # name = "rwtm";
+ # patch = null;
+ # extraConfig = ''
+ # TURRIS_MOX_RWTM y
+ # ARMADA_37XX_RWTM_MBOX y
+ # '';
+ #}];
+
+ networking.hostapd = {
+ "mlan0" = {
+ countryCode = "CZ";
+ ssid = "TurrisRules";
+ wpa = true;
+ wpaPskFile = "/run/secrets/wifi/TurrisRules.psk";
+ };
+ "wlp1s0" = {
+ countryCode = "CZ";
+ hwMode = "a";
+ channel = 36;
+ 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";
+ wpa = true;
+ wpaPskFile = "/run/secrets/wifi/TurrisRules5.psk";
+ bss = {
+ "wlp1s0host" = {
+ ssid = "NixTurris5Guest";
+ wpa = true;
+ wpaPassphrase = "somepassword";
+ };
+ };
+ };
+ };
+
+ networking = {
+ vlans = {
+ "eth0.2" = {
+ id = 2;
+ interface = "eth0";
+ };
+ };
+ bridges = {
+ brlan = {
+ interfaces = [
+ "eth0" #"mlan0" "wlp1s0"
+ ];
+ };
+ brguest = {
+ interfaces = [
+ "eth0.2" #"mlan0host" "wlp1s0host"
+ ];
+ };
+ };
+ interfaces.brlan = {
+ ipv4 = {
+ addresses = [{
+ address = config.cynerd.hosts.spt.mox2;
+ prefixLength = 24;
+ }];
+ };
+ };
+ defaultGateway = config.cynerd.hosts.spt.omnia;
+ nameservers = [ config.cynerd.hosts.spt.omnia "1.1.1.1" "8.8.8.8" ];
+ dhcpcd.allowInterfaces = [ "brlan" ];
+ };
+ };
+
+}