summaryrefslogtreecommitdiffstats
path: root/jeschli/2configs/virtualbox.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-02-28 20:10:42 +0000
committerjeschli <jeschli@gmail.com>2018-02-28 20:10:42 +0000
commita7e49dd5fc590ba2ccb26d559d672767c87a7692 (patch)
tree3d0fb66d17085f1288037da1b4d9987fa402e40e /jeschli/2configs/virtualbox.nix
parent4a2af184e6846f80b139357c6230558cd8785b10 (diff)
parent4c0d0f64ed21d3d7292bb5e8900d973e649375c1 (diff)
Merge branch 'staging/jeschli' of prism.i:stockholm into staging/jeschli
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
+ '';
+}