stockholm/lass/2configs/virtualbox.nix

26 lines
632 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
nixpkgs.config.virtualbox.enableExtensionPack = true;
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;
extraGroups = [ "vboxusers" "audio" ];
createHome = true;
};
};
security.sudo.extraConfig = ''
${mainUser.name} ALL=(virtual) NOPASSWD: ALL
'';
}