mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 02:19:41 +00:00
ItsDrike
00016063fe
Originally, I was including all role configurations for all hosts, and controlling which get applied in the role configs with a check in each file. This is a very repetetive and annoying approach. Instead, now the role directory is included manually from the hosts config for devices which meet that role, removing the role options.
22 lines
494 B
Nix
22 lines
494 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib) mkIf;
|
|
cfgUser = config.myOptions.system.username;
|
|
cfg = config.myOptions.home-manager.programs.applications.virtualbox;
|
|
in {
|
|
config = mkIf 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;
|
|
};
|
|
|
|
users.extraGroups.vboxusers.members = ["${cfgUser}"];
|
|
};
|
|
}
|