a75c64d04a
This puts a hard dependency on 20.09, but that's to be expected.
22 lines
448 B
Nix
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
|