Last active
February 27, 2020 23:18
-
-
Save amalbuquerque/075aba989446bd880731a2a89ad6dc62 to your computer and use it in GitHub Desktop.
Configure :nerves_network, disable :nerves_init_gadget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config/custom_rpi0.exs b/config/custom_rpi0.exs | |
new file mode 100644 | |
index 0000000..b551d92 | |
--- /dev/null | |
+++ b/config/custom_rpi0.exs | |
@@ -0,0 +1,15 @@ | |
+use Mix.Config | |
+ | |
+config :nerves_network, | |
+ regulatory_domain: "EU" | |
+ | |
+config :nerves_network, :default, | |
+ wlan0: [ | |
+ networks: [ | |
+ [ | |
+ ssid: System.get_env("NERVES_NETWORK_SSID"), | |
+ psk: System.get_env("NERVES_NETWORK_PSK"), | |
+ key_mgmt: :"WPA-PSK" | |
+ ] | |
+ ] | |
+ ] | |
diff --git a/config/target.exs b/config/target.exs | |
index a337a74..1a1d1d3 100644 | |
--- a/config/target.exs | |
+++ b/config/target.exs | |
@@ -30,15 +30,8 @@ config :nerves_firmware_ssh, | |
# Only enable this for prod if you understand the risks. | |
node_name = if Mix.env() != :prod, do: "elixir_keeb" | |
-config :nerves_init_gadget, | |
- ifname: "usb0", | |
- address_method: :dhcpd, | |
- mdns_domain: "nerves.local", | |
- node_name: node_name, | |
- node_host: :mdns_domain | |
- | |
# Import target specific config. This must remain at the bottom | |
# of this file so it overrides the configuration defined above. | |
# Uncomment to use target specific configurations | |
-# import_config "#{Mix.target()}.exs" | |
+import_config "#{Mix.target()}.exs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment