From 8d1ee27e14838e740534ef13b8108edb0a92b989 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 6 Apr 2020 23:06:23 -0400 Subject: [PATCH] doc: Document importing Mobile NixOS in your configuration.nix --- doc/getting-started.adoc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/getting-started.adoc b/doc/getting-started.adoc index d87b4f3c..b50c72e2 100644 --- a/doc/getting-started.adoc +++ b/doc/getting-started.adoc @@ -125,6 +125,36 @@ The <> page will be useful, as it provides an overview of all the Mobile NixOS specific options. +== Using in your system configuration + +As the Mobile NixOS configuration may include fixes and quirks for your device, +it is useful to include its configuration into your system's +`configuration.nix`. + +Assuming your `NIX_PATH` includes `mobile-nixos=/path/to/mobile-nixos` you can +import the Mobile NixOS configuration for your device by doing the following. + +```nix +# configuration.nix +{ + imports = [ + (import { device = "xxx-yyy"; }) + # ... + ]; + + # ... + # Other configurations... + # ... +} +``` + +While it is possible, it is discouraged to directly import the configuration +files from the `examples` directories. They may change in ways breaking your +system configuration. It is recommender to copy and edit the configuration +files from the `examples` directories if you are basing your configuration off +of an example. + + == Contributing This is a big topic, and not something about getting started! Though, quickly