summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmery <emery@v36.space>2016-02-23 19:19:18 +0100
committerEmery <emery@v36.space>2016-02-23 19:23:55 +0100
commit13a1d5c0bdb22fc69774131c606c07a9272227fa (patch)
treec3cce82f4933adb1b0639af77f89076fffc006fd
parent8bf98661f4bdf63568ecf27afd205c6d8fe4602b (diff)
usbarmory: move to /inversepath, host support
-rw-r--r--inversepath/usbarmory/configuration.nix (renamed from usbarmory/configuration.nix)0
-rw-r--r--inversepath/usbarmory/customKernel.config (renamed from usbarmory/customKernel.config)0
-rw-r--r--inversepath/usbarmory/host.nix35
-rw-r--r--inversepath/usbarmory/usbarmory_dts.patch (renamed from usbarmory/usbarmory_dts.patch)0
4 files changed, 35 insertions, 0 deletions
diff --git a/usbarmory/configuration.nix b/inversepath/usbarmory/configuration.nix
index 77efd5e..77efd5e 100644
--- a/usbarmory/configuration.nix
+++ b/inversepath/usbarmory/configuration.nix
diff --git a/usbarmory/customKernel.config b/inversepath/usbarmory/customKernel.config
index 5c6b47f..5c6b47f 100644
--- a/usbarmory/customKernel.config
+++ b/inversepath/usbarmory/customKernel.config
diff --git a/inversepath/usbarmory/host.nix b/inversepath/usbarmory/host.nix
new file mode 100644
index 0000000..eff7947
--- /dev/null
+++ b/inversepath/usbarmory/host.nix
@@ -0,0 +1,35 @@
+#
+# Module for hosting the USB Armory
+#
+
+{ ... }:
+
+let
+ staticDevName = "armory0";
+in
+
+{
+ imports = [ ../../lib/hardware-notes.nix ];
+
+ hardwareNotes =
+ [ { title = "USB Armory network interface support";
+ text =
+ '' - rename the Armory USB network interface
+ - set Armory inteface ip to 10.0.0.2/24
+ - enable NAT and forward Armory interface
+ - add the name 'armory' to /etc/hosts
+ '';
+ }
+ ];
+
+ services.udev.extraRules =
+ ''SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a4a2", NAME="${staticDevName}"'';
+ # systemshit will probably still leave an a interface with a garbage name around
+
+ networking =
+ { interfaces."${staticDevName}".ip4 = [{ address = "10.0.0.2"; prefixLength = 24; }];
+ nat = { enable = true; internalInterfaces = [ staticDevName ]; };
+ extraHosts = "10.0.0.1 armory";
+ };
+
+}
diff --git a/usbarmory/usbarmory_dts.patch b/inversepath/usbarmory/usbarmory_dts.patch
index e29c6dd..e29c6dd 100644
--- a/usbarmory/usbarmory_dts.patch
+++ b/inversepath/usbarmory/usbarmory_dts.patch