[virtualbox] Move into proper module

This commit is contained in:
Tibo De Peuter 2023-10-18 16:47:13 +02:00
parent b6044e99dc
commit c46a7ce9c3
7 changed files with 29 additions and 20 deletions

View file

@ -5,7 +5,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../modules-old/hardware/nvidia.nix ../../modules-old/hardware/nvidia.nix
../../modules-old/apps/virtualbox
../../modules-old/des/gnome ../../modules-old/des/gnome
]; ];

View file

@ -4,6 +4,5 @@
./kitty ./kitty
./steam ./steam
./thunderbird ./thunderbird
# ./virtualbox
]; ];
} }

View file

@ -1,17 +0,0 @@
{
virtualisation.virtualbox = {
host = {
enable = true;
enableExtensionPack = true;
};
guest = {
enable = true;
x11 = true;
};
};
users.extraGroups.vboxusers.members = [
"user-with-access-to-virtualbox"
];
}

View file

@ -4,5 +4,6 @@
imports = [ imports = [
./programs ./programs
./users ./users
./virtualisation
]; ];
} }

View file

@ -30,7 +30,6 @@ in {
# If you specify an application here, it will be detected by the configuration module # If you specify an application here, it will be detected by the configuration module
# and the configuration files will be put in place for you. # and the configuration files will be put in place for you.
packages = with pkgs; [ packages = with pkgs; [
brave
duf duf
jellyfin-media-player jellyfin-media-player
libreoffice-fresh libreoffice-fresh

View file

@ -0,0 +1,5 @@
{
imports = [
./virtualbox
];
}

View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sisyphus.virtualisation.virtualbox;
in {
options.sisyphus.virtualisation.virtualbox.enable = lib.mkEnableOption "VirtualBox";
config = lib.mkIf cfg.enable {
virtualisation.virtualbox = {
host = {
enable = true;
enableExtensionPack = true;
};
guest = {
enable = true;
x11 = true;
};
};
users.extraGroups.vboxusers.members = [
"user-with-access-to-virtualbox"
];
};
}