     {:nerves_system_test, :priv_dir, "test"}
   ]
 
+# The configuration stored here is duplicated from the project so it can be
+#  validated by nerves_system_test because the source is unavailable at runtime.
 config :nerves_runtime, :kv,
-  nerves_fw_application_part0_devpath: "/dev/mmcblk0p3",
+  nerves_fw_application_part0_devpath: app_part_devparth,
   nerves_fw_application_part0_fstype: "ext4",
   nerves_fw_application_part0_target: "/root",
   nerves_fw_architecture: arch,

use Mix.Config

system = :nerves_system_rpi0
platform = "rpi0"
arch = "arm"

test_server = System.get_env("NERVES_TEST_SERVER")
network_interface = System.get_env("NERVES_NETWORK_INTERFACE") || "usb0"
websocket_protocol = System.get_env("WEBSOCKET_PROTOCOL") || "ws"

config :bootloader,
  app: :nerves_system_test,
  init: [:nerves_runtime, :nerves_network]

config :nerves_system_test, :firmware,
  public_key: System.get_env("NERVES_FW_PUB_KEY")

config :system_registry, SystemRegistry.TermStorage,
  path: "/root/system_registry",
  scopes: [

    ipv4_address_method: :linklocal
  ]

# Configure the url for the connection to the test server phoenix channel socket.
config :nerves_system_test, NervesTestServer.Socket,
  url: "#{websocket_protocol}://#{test_server}/socket/websocket"

# Configure the test suite. nerves_system_test needs to know information such as
#  system - the name of the system repo the tests are being executed on
#  network_interface - the interface that should be used for reporting the
#   results on
#  tests - the locations for the tests to run.
#    Currently, it is only supported that tests are included in the priv_dir
#    of the app and dependencies. The default layout runs tests that are common
#    across devices (:nerves_system_test) and those that are specific to the
#    device (this app)
config :nerves_system_test,
  system: system,
  network_interface: network_interface,
