From 3131b72a7c2a260e2f985a0fc8abccae7cce9280 Mon Sep 17 00:00:00 2001 From: Markus Hihn Date: Fri, 19 Jan 2018 10:36:35 +0100 Subject: j bln: +virtualbox --- jeschli/1systems/bln/config.nix | 1 + jeschli/2configs/virtualbox.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 jeschli/2configs/virtualbox.nix (limited to 'jeschli') diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index 9e5f8c52e..9c491c8a1 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix # ./dcso-vpn.nix ]; 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 + ''; +} -- cgit v1.2.3