# `Nerves.Erlinit`
[🔗](https://github.com/nerves-project/nerves/blob/v1.15.1/lib/nerves/erlinit.ex#L8)

Decode and encode erlinit.config files

This module is used to decode, merge, and encode multiple erlinit.config
files.

# `option`

```elixir
@type option() ::
  {:boot, Path.t()}
  | {:ctty, String.t()}
  | {:uniqueid_exec, String.t()}
  | {:env, String.t()}
  | {:gid, non_neg_integer()}
  | {:graceful_shutdown_timeout, non_neg_integer()}
  | {:hang_on_exit, boolean()}
  | {:hang_on_fatal, boolean()}
  | {:limits, String.t()}
  | {:mount, String.t()}
  | {:hostname_pattern, String.t()}
  | {:pre_run_exec, String.t()}
  | {:poweroff_on_exit, boolean()}
  | {:poweroff_on_fatal, boolean()}
  | {:reboot_on_fatal, boolean()}
  | {:release_path, Path.t()}
  | {:run_on_exit, String.t()}
  | {:alternate_exec, String.t()}
  | {:print_timing, boolean()}
  | {:uid, non_neg_integer()}
  | {:update_clock, boolean()}
  | {:verbose, boolean()}
  | {:warn_unused_tty, boolean()}
  | {:working_directory, Path.t()}
  | {:shutdown_report, Path.t()}
```

# `t`

```elixir
@type t() :: [option()]
```

# `decode_config`

```elixir
@spec decode_config(String.t()) :: t()
```

Decode the data from the config into a keyword list

# `encode_config`

```elixir
@spec encode_config(t()) :: String.t()
```

Encode the keyword list options into an erlinit.config file format

# `merge_opts`

```elixir
@spec merge_opts(t(), t()) :: t()
```

Merge keyword options

# `system_config_file`

```elixir
@spec system_config_file(Nerves.Package.t()) :: {:ok, Path.t()} | {:error, :no_config}
```

Return the path to the erlinit.config file provided by the Nerves System

---

*Consult [api-reference.md](api-reference.md) for complete listing*
