summaryrefslogtreecommitdiffstats
path: root/jeschli/2configs/virtualbox.nix
diff options
context:
space:
mode:
authornin <nin@c-base.org>2018-01-30 23:06:17 +0100
committernin <nin@c-base.org>2018-01-30 23:06:17 +0100
commit6849d7aa4810d5f1f2ec55d852d21812dd1b8002 (patch)
treeb2b236981d6cb2d226fbe239845838a15c22b30e /jeschli/2configs/virtualbox.nix
parent80c2e23ec028bfda5c0bad0e3269648d34d298b0 (diff)
parentffc294575cb59585c3bfb6b85fa45fb69cdf1d41 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'jeschli/2configs/virtualbox.nix')
-rw-r--r--jeschli/2configs/virtualbox.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/jeschli/2configs/virtualbox.nix b/jeschli/2configs/virtualbox.nix
new file mode 100644
index 000000000..b2cb851a1
--- /dev/null
+++ b/jeschli/2configs/virtualbox.nix
@@ -0,0 +1,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
+ '';
+}