https://github.com/nerves-project/nerves_motd
Message of the Day for Nerves devices
https://github.com/nerves-project/nerves_motd
elixir motd nerves
Last synced: 5 months ago
JSON representation
Message of the Day for Nerves devices
- Host: GitHub
- URL: https://github.com/nerves-project/nerves_motd
- Owner: nerves-project
- Created: 2021-09-02T14:33:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T17:03:45.000Z (6 months ago)
- Last Synced: 2025-04-18T07:46:36.812Z (6 months ago)
- Topics: elixir, motd, nerves
- Language: Elixir
- Homepage:
- Size: 195 KB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSES/Apache-2.0.txt
Awesome Lists containing this project
README
# nerves_motd
[](https://hex.pm/packages/nerves_motd)
[](https://hexdocs.pm/nerves_motd/NervesMOTD.html)
[](https://dl.circleci.com/status-badge/redirect/gh/nerves-project/nerves_motd/tree/main)
[](https://api.reuse.software/info/github.com/nerves-project/nerves_motd)`nerves_motd` prints a ["message of the
day"](https://en.wikipedia.org/wiki/Motd_(Unix)) on Nerves devices.
## Usage
The primary function is `NervesMOTD.print()` which prints the base layout based
on the template below:```
()
Serial :
Uptime : 18.296 seconds
Clock : 2023-05-18 00:05:20 JST: ,
```To have `NervesMOTD` print automatically when first accessing a device, add
`NervesMOTD.print()` to your `iex.exs` file (typically in
`rootfs_overlay/etc/iex.exs`)### Customization
`NervesMOTD.print/1` supports a few options for customizing the base layout:
* `:logo` - Change the logo displayed. Defaults to the Nerves logo. Set to `""`
to prevent any logo from being displayed
* `:extra_rows` - a list of custom rows or a callback for returning rows to be
appended to the end of the layout. The callback can be a 0-arity function
reference or MFArgs tuple.For convenience, `NervesMOTD.print/1` options may be stored in the application
environment in your `config.exs` to be used whenever `NervesMOTD.print/0` is
called:```elixir
config :nerves_motd,
logo: """
Custom logo
""",
extra_rows: [
[{"Label", "value"}, {"Label2", "value2"}],
[{"Long label", "Lots of text"}]
]
```## Installation
Install by adding `:nerves_motd` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:nerves_motd, "~> 0.1.0"}
]
end
```For details, see [API reference](https://hexdocs.pm/nerves_motd/api-reference.html).
## License
All original source code in this project is licensed under Apache-2.0.
Additionally, this project follows the [REUSE recommendations](https://reuse.software)
and labels so that licensing and copyright are clear at the file level.