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; [ imports = with self.nixosModules; [
nix-ld nix-ld
virtualbox
restic restic
docker docker
]; ];
oizys = { oizys = {
vbox.enable = true;
desktop.enable = true; desktop.enable = true;
vpn.enable = true; vpn.enable = true;
languages = [ languages = [

View file

@ -19,6 +19,9 @@
qtile qtile
hyprland hyprland
virtualbox
gui gui
languages 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 = { virtualisation.virtualbox = {
host.enable = true; host.enable = true;
# guest.enable = true;
}; };
users.extraGroups.vboxusers.members = ["daylin"]; users.extraGroups.vboxusers.members = ["daylin"];
};
} }