1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-11 21:17:45 +03:00
mobile-nixos/lib/configuration.nix
Samuel Dionne-Riel 6c68869eed lib/configuration: Allow not providing a device name
This is useful for including the Mobile NixOS configuration to opt into
a single subsystem (e.g. stage-1).
2022-05-29 22:39:11 -04:00

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
;
}