File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 400
400
401
401
qemu . machine = mkOption {
402
402
type = types . str ;
403
- default = {
404
- x86_64-linux = "microvm" ;
405
- aarch64-linux = "virt" ;
406
- } . ${ pkgs . system } ;
407
403
description = ''
408
404
QEMU machine model, eg. `microvm`, or `q35`
409
405
410
406
Get a full list with `qemu-system-x86_64 -M help`
407
+
408
+ This has a default declared with `lib.mkDefault` because it
409
+ depends on '' ${pkgs.system}.
411
410
'' ;
412
411
} ;
413
412
469
468
defaultText = literalExpression ''"config.microvm.runner.'' ${config.microvm.hypervisor}"'' ;
470
469
} ;
471
470
} ;
471
+
472
+ config = lib . mkMerge [ {
473
+ microvm . qemu . machine =
474
+ lib . mkIf ( pkgs . system == "x86_64-linux" ) (
475
+ lib . mkDefault "microvm"
476
+ ) ;
477
+ } {
478
+ microvm . qemu . machine =
479
+ lib . mkIf ( pkgs . system == "aarch64-linux" ) (
480
+ lib . mkDefault "virt"
481
+ ) ;
482
+ } ] ;
472
483
}
You can’t perform that action at this time.
0 commit comments