Skip to content

Commit 75b5964

Browse files
Format
1 parent 6e976d3 commit 75b5964

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

nixos-modules/microvm/options.nix

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -475,36 +475,38 @@ in
475475
'';
476476
};
477477

478-
graphics.enable = mkOption {
479-
type = types.bool;
480-
default = false;
481-
description = ''
482-
Enable GUI support.
483-
484-
MicroVMs with graphics are intended for the interactive
485-
use-case. They cannot be started through systemd jobs.
486-
487-
The display backend is chosen by `microvm.graphics.backend`.
488-
'';
489-
};
490-
491-
graphics.backend = mkOption {
492-
type = types.enum [ "gtk" "cocoa" ];
493-
default = if pkgs.stdenv.hostPlatform.isDarwin then "cocoa" else "gtk";
494-
defaultText = lib.literalExpression ''if pkgs.stdenv.hostPlatform.isDarwin then "cocoa" else "gtk"'';
495-
description = ''
496-
QEMU display backend to use when `graphics.enable` is true.
497-
498-
Defaults to `cocoa` on Darwin hosts and `gtk` otherwise.
499-
'';
500-
};
501-
502-
graphics.socket = mkOption {
503-
type = types.str;
504-
default = "${hostName}-gpu.sock";
505-
description = ''
506-
Path of vhost-user socket
507-
'';
478+
graphics = {
479+
enable = mkOption {
480+
type = types.bool;
481+
default = false;
482+
description = ''
483+
Enable GUI support.
484+
485+
MicroVMs with graphics are intended for the interactive
486+
use-case. They cannot be started through systemd jobs.
487+
488+
The display backend is chosen by `microvm.graphics.backend`.
489+
'';
490+
};
491+
492+
backend = mkOption {
493+
type = types.enum [ "gtk" "cocoa" ];
494+
default = if pkgs.stdenv.hostPlatform.isDarwin then "cocoa" else "gtk";
495+
defaultText = lib.literalExpression ''if pkgs.stdenv.hostPlatform.isDarwin then "cocoa" else "gtk"'';
496+
description = ''
497+
QEMU display backend to use when `graphics.enable` is true.
498+
499+
Defaults to `cocoa` on Darwin hosts and `gtk` otherwise.
500+
'';
501+
};
502+
503+
socket = mkOption {
504+
type = types.str;
505+
default = "${hostName}-gpu.sock";
506+
description = ''
507+
Path of vhost-user socket
508+
'';
509+
};
508510
};
509511

510512
vmHostPackages = mkOption {

0 commit comments

Comments
 (0)