stockholm/lass/2configs/virtualbox.nix

25 lines
584 B
Nix
Raw Normal View History

2015-07-16 13:51:01 +00:00
{ config, pkgs, ... }:
let
mainUser = config.users.extraUsers.mainUser;
in {
#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
'';
}