[qemu][docker] Add modules and use on laptop

This commit is contained in:
Tibo De Peuter 2023-11-24 19:08:42 +01:00
parent d9188bfd13
commit 414bb4b983
4 changed files with 33 additions and 1 deletions

View file

@ -32,7 +32,11 @@
users.tdpeuter.enable = true; users.tdpeuter.enable = true;
virtualisation.virtualbox.enable = true; virtualisation = {
docker.enable = true;
qemu.enable = true;
virtualbox.enable = true;
};
}; };
boot = { boot = {

View file

@ -1,5 +1,7 @@
{ {
imports = [ imports = [
./docker
./qemu
./virtualbox ./virtualbox
]; ];
} }

View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sisyphus.virtualisation.docker;
in {
options.sisyphus.virtualisation.docker.enable = lib.mkEnableOption "Docker";
config = lib.mkIf cfg.enable {
virtualisation.docker.enable = true;
};
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sisyphus.virtualisation.qemu;
in {
options.sisyphus.virtualisation.qemu.enable = lib.mkEnableOption "QEMU";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
qemu
];
virtualisation.libvirtd.qemu.runAsRoot = false;
};
}