stockholm/jeschli/2configs/virtualbox.nix
2018-03-20 15:17:36 +01:00

24 lines
517 B
Nix

{ config, pkgs, ... }:
let
mainUser = config.users.extraUsers.jeschli;
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
'';
}