Skip to content

Commit

Permalink
Allow evaluating a device from a path
Browse files Browse the repository at this point in the history
This allows external device definitions to be used.
  • Loading branch information
samueldr committed Jun 6, 2020
1 parent fda130f commit feb1f4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions default.nix
Expand Up @@ -64,6 +64,8 @@ in
if device == null then (id: id) else
if device ? special
then header "Evaluating: ${device.name}"
else if (builtins.tryEval (builtins.pathExists device)).value
then header "Evaluating device from path: ${toString device}"
else header "Evaluating device: ${device}"
)
{
Expand Down
1 change: 1 addition & 0 deletions lib/release-tools.nix
Expand Up @@ -20,6 +20,7 @@
modules =
(if device ? special
then [ device.config ]
else if builtins.isPath device then [ { imports = [ device ]; } ]
else [ { imports = [(../. + "/devices/${device}")]; } ])
++ modules
++ [ additionalConfiguration ]
Expand Down

0 comments on commit feb1f4a

Please sign in to comment.