summaryrefslogtreecommitdiffstats
path: root/jeschli
diff options
context:
space:
mode:
authorMarkus Hihn <markus.hihn@dcso.de>2018-01-19 10:36:35 +0100
committerMarkus Hihn <markus.hihn@dcso.de>2018-01-19 10:36:50 +0100
commit07385e90128c3dd1ae5c1f7742ecb3e1382af36d (patch)
tree1c6303254ab2149d24a87858a9d394f162bc338f /jeschli
parent36ffd69822a2a9b85ee094f82e9eee03cd9f199d (diff)
j bln: +virtualbox
Diffstat (limited to 'jeschli')
-rw-r--r--jeschli/1systems/bln/config.nix1
-rw-r--r--jeschli/2configs/virtualbox.nix23
2 files changed, 24 insertions, 0 deletions
diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix
index 9e5f8c5..9c491c8 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.
<stockholm/jeschli>
+ <stockholm/jeschli/2configs/virtualbox.nix>
./hardware-configuration.nix
# ./dcso-vpn.nix
];
diff --git a/jeschli/2configs/virtualbox.nix b/jeschli/2configs/virtualbox.nix
new file mode 100644
index 0000000..b2cb851
--- /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
+ '';
+}