stockholm/old/modules/lass/virtualbox.nix
2015-07-11 19:44:12 +02:00

23 lines
469 B
Nix

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