summaryrefslogtreecommitdiffstats
path: root/jeschli/2configs/virtualbox.nix
blob: b2cb851a182fb7e854d1ffc187b273aa1b709fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ 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
  '';
}