From cbed0107be370f8b121e888dc852efc184e0ef70 Mon Sep 17 00:00:00 2001 From: derped Date: Sat, 14 Dec 2024 22:00:03 +0100 Subject: [PATCH] virt: add virtualbox --- config/users.nix | 1 + services/virtualbox.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 services/virtualbox.nix diff --git a/config/users.nix b/config/users.nix index f364002..71b83f2 100644 --- a/config/users.nix +++ b/config/users.nix @@ -47,6 +47,7 @@ let "lp" ]) ++ (optional config.programs.virt-manager.enable "libvirtd") + ++ (optional config.virtualisation.virtualbox.host.enable "vboxusers") ++ (optional (withDocker && !withPodman) "docker") ++ (optional withPodman "podman"); shell = "${pkgs.zsh}/bin/zsh"; diff --git a/services/virtualbox.nix b/services/virtualbox.nix new file mode 100644 index 0000000..95c32d1 --- /dev/null +++ b/services/virtualbox.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: +with lib; + +mkIf (elem "virtualbox" config.machine.services) { + virtualisation.virtualbox.host = { + enable = true; + headless = true; + }; +}