stockholm/jeschli/2configs/virtualbox.nix

24 lines
516 B
Nix
Raw Normal View History

2018-01-19 09:36:35 +00:00
{ config, pkgs, ... }:
let
mainUser = config.users.extraUsers.markus;
in {
#services.virtualboxHost.enable = true;
virtualisation.virtualbox.host.enable = true;
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
'';
}