Add system-wide dependencies for virtualbox

This commit is contained in:
ItsDrike 2024-07-08 15:17:21 +02:00
parent 82a07127b7
commit 1d49318179
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 21 additions and 0 deletions

View file

@ -3,5 +3,6 @@
./misc.nix ./misc.nix
./physlock.nix ./physlock.nix
./thunar.nix ./thunar.nix
./virtualbox.nix
]; ];
} }

View file

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