make virtualbox a more proper module

This commit is contained in:
Daylin Morgan 2024-03-12 10:00:05 -05:00
parent 38d3219ad4
commit 7bd5e95612
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 16 additions and 3 deletions

View file

@ -5,12 +5,12 @@
}: {
imports = with self.nixosModules; [
nix-ld
virtualbox
restic
docker
];
oizys = {
vbox.enable = true;
desktop.enable = true;
vpn.enable = true;
languages = [

View file

@ -19,6 +19,9 @@
qtile
hyprland
virtualbox
gui
languages

View file

@ -1,7 +1,17 @@
{...}: {
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.vbox;
in {
options.oizys.vbox.enable = mkEnableOption "enable virtualbox host";
config = mkIf cfg.enable {
virtualisation.virtualbox = {
host.enable = true;
# guest.enable = true;
};
users.extraGroups.vboxusers.members = ["daylin"];
};
}