diff --git a/system/roles/workstation/programs/default.nix b/system/roles/workstation/programs/default.nix index 10f2500..7a16f0e 100644 --- a/system/roles/workstation/programs/default.nix +++ b/system/roles/workstation/programs/default.nix @@ -3,5 +3,6 @@ ./misc.nix ./physlock.nix ./thunar.nix + ./virtualbox.nix ]; } diff --git a/system/roles/workstation/programs/virtualbox.nix b/system/roles/workstation/programs/virtualbox.nix new file mode 100644 index 0000000..821c0ef --- /dev/null +++ b/system/roles/workstation/programs/virtualbox.nix @@ -0,0 +1,20 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.myOptions.home-manager.programs.applications.virtualbox; + deviceType = config.myOptions.device.roles.type; + acceptedTypes = ["laptop" "desktop"]; +in { + config = mkIf ((builtins.elem deviceType acceptedTypes) && cfg.enable) { + virtualisation.virtualbox.host = { + enable = true; + + # Don't include the Qt dependency and GUI app, + # if gui is desired, it can be installed separately on a per-user basis + headless = true; + }; + }; +}