[qemu][docker] Add modules and use on laptop
This commit is contained in:
parent
d9188bfd13
commit
414bb4b983
4 changed files with 33 additions and 1 deletions
|
@ -32,7 +32,11 @@
|
|||
|
||||
users.tdpeuter.enable = true;
|
||||
|
||||
virtualisation.virtualbox.enable = true;
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
qemu.enable = true;
|
||||
virtualbox.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./docker
|
||||
./qemu
|
||||
./virtualbox
|
||||
];
|
||||
}
|
||||
|
|
11
nixos/modules/virtualisation/docker/default.nix
Normal file
11
nixos/modules/virtualisation/docker/default.nix
Normal 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;
|
||||
};
|
||||
}
|
15
nixos/modules/virtualisation/qemu/default.nix
Normal file
15
nixos/modules/virtualisation/qemu/default.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue