mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-08-17 08:00:22 +03:00
qcow: add virtualization.qemuImage.diskSize option
This commit is contained in:
parent
d72adc1a0a
commit
3cd90f3cfc
@ -1,5 +1,16 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
options = {
|
||||
virtualization.qemuImage.diskSize = mkOption {
|
||||
type = types.int;
|
||||
default = 8192;
|
||||
description = ''
|
||||
Size of disk image. Unit is MB.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
autoResize = true;
|
||||
@ -14,9 +25,10 @@
|
||||
|
||||
system.build.qcow = import "${toString modulesPath}/../lib/make-disk-image.nix" {
|
||||
inherit lib config pkgs;
|
||||
diskSize = 8192;
|
||||
diskSize = config.virtualization.qemuImage.diskSize;
|
||||
format = "qcow2";
|
||||
};
|
||||
|
||||
formatAttr = "qcow";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user