bonfire/modules/desktop/vm/qemu.nix

22 lines
481 B
Nix
Raw Normal View History

2023-06-06 23:18:09 +05:00
{ options, config, lib, pkgs, ... }:
with lib;
with lib.custom;
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