1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-13 04:04:35 +03:00
mobile-nixos/lib/configuration.nix

27 lines
546 B
Nix
Raw Normal View History

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