mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-11 21:17:45 +03:00
6c68869eed
This is useful for including the Mobile NixOS configuration to opt into a single subsystem (e.g. stage-1).
27 lines
546 B
Nix
27 lines
546 B
Nix
# This file is intended to be included in your system's `configuration.nix`.
|
|
# Given a device name, it will import the appropriate device configuration, and
|
|
# all the modules from Mobile NixOS.
|
|
#
|
|
# Assuming NIX_PATH contains `mobile-nixos`:
|
|
#
|
|
# ```
|
|
# {
|
|
# imports = [
|
|
# (import <mobile-nixos/lib/configuration.nix> { device = "xxx-yyy"; })
|
|
# ];
|
|
# }
|
|
# ```
|
|
|
|
{ device ? null }:
|
|
|
|
{
|
|
imports =
|
|
(
|
|
if device == null
|
|
then []
|
|
else [ (import (../devices + "/${device}")) ]
|
|
)
|
|
++ import ../modules/module-list.nix
|
|
;
|
|
}
|