stockholm/old/modules/lass/virtualbox.nix

23 lines
469 B
Nix
Raw Normal View History

2015-04-09 23:37:29 +00:00
{ config, pkgs, ... }:
2015-04-12 18:36:32 +00:00
let
mainUser = config.users.extraUsers.mainUser;
in {
2015-04-09 23:37:29 +00:00
services.virtualboxHost.enable = true;
users.extraUsers = {
virtual = {
name = "virtual";
description = "user for running VirtualBox";
home = "/home/virtual";
useDefaultShell = true;
2015-05-29 00:44:54 +00:00
extraGroups = [ "vboxusers" "audio" ];
2015-04-09 23:37:29 +00:00
createHome = true;
};
};
2015-04-10 11:30:12 +00:00
security.sudo.extraConfig = ''
2015-04-12 18:36:32 +00:00
${mainUser.name} ALL=(virtual) NOPASSWD: ALL
2015-04-10 11:30:12 +00:00
'';
2015-04-09 23:37:29 +00:00
}