22 lines
454 B
Nix
22 lines
454 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
with lib;
|
||
|
{
|
||
|
|
||
|
options.components.virtualisation.virtualbox.enable = lib.mkOption {
|
||
|
type = lib.types.bool;
|
||
|
default = config.components.virtualisation.enable;
|
||
|
};
|
||
|
|
||
|
config = mkIf config.components.virtualisation.virtualbox.enable {
|
||
|
|
||
|
virtualisation.virtualbox = {
|
||
|
host.enable = true;
|
||
|
guest.enable = true;
|
||
|
};
|
||
|
|
||
|
users.extraGroups.vboxusers.members = [ config.users.users.mainUser.name ];
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|