1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-13 06:29:40 +01:00
nixos-hardware/inversepath/usbarmory/host.nix

20 lines
415 B
Nix
Raw Normal View History

2017-12-24 18:21:43 +01:00
{ dev ? "armory0" }:
{
2017-12-24 18:21:43 +01:00
services.udev.extraRules = ''
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a4a2", NAME="${staticDevName}"
'';
2017-12-24 18:21:43 +01:00
networking = {
interfaces."${staticDevName}".ip4 = [{
address = "10.0.0.2";
prefixLength = 24;
}];
nat = {
enable = true;
internalInterfaces = [ dev ];
};
2017-12-24 18:21:43 +01:00
extraHosts = "10.0.0.1 armory";
};
}