stockholm/jeschli/2configs/virtualbox.nix
2018-01-19 10:36:50 +01:00

24 lines
516 B
Nix

{ 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
'';
}