stockholm/jeschli/2configs/virtualbox.nix

24 lines
517 B
Nix
Raw Normal View History

2018-01-19 09:36:35 +00:00
{ config, pkgs, ... }:
let
2018-03-20 14:17:36 +00:00
mainUser = config.users.extraUsers.jeschli;
2018-01-19 09:36:35 +00:00
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
'';
}