2015-07-16 13:51:01 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
mainUser = config.users.extraUsers.mainUser;
|
|
|
|
|
|
|
|
in {
|
2015-10-01 20:28:54 +00:00
|
|
|
#services.virtualboxHost.enable = true;
|
|
|
|
virtualisation.virtualbox.host.enable = true;
|
2018-04-03 10:02:31 +00:00
|
|
|
virtualisation.virtualbox.host.enableHardening = false;
|
2015-07-16 13:51:01 +00:00
|
|
|
|
|
|
|
users.extraUsers = {
|
|
|
|
virtual = {
|
|
|
|
name = "virtual";
|
|
|
|
description = "user for running VirtualBox";
|
|
|
|
home = "/home/virtual";
|
|
|
|
useDefaultShell = true;
|
2018-06-27 21:57:25 +00:00
|
|
|
extraGroups = [ "vboxusers" "audio" "video" ];
|
2015-07-16 13:51:01 +00:00
|
|
|
createHome = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
security.sudo.extraConfig = ''
|
|
|
|
${mainUser.name} ALL=(virtual) NOPASSWD: ALL
|
|
|
|
'';
|
|
|
|
}
|