helm/modules/desktop/vm/qemu.nix
Henrik Lissner a75c64d04a
Rewrite to use flakes
This puts a hard dependency on 20.09, but that's to be expected.
2020-10-11 01:31:33 -04:00

22 lines
448 B
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.desktop.vm.qemu;
in {
options.modules.desktop.vm.qemu = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
qemu
];
};
}
# Creating an image:
# qemu-img create -f qcow2 disk.img
# Creating a snapshot (don't tamper with disk.img):
# qemu-img create -f qcow2 -b disk.img snapshot.img