mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
virtualisation/oci-image: use system.build.image
This commit is contained in:
parent
a0ce661c99
commit
d8410d8366
1 changed files with 8 additions and 1 deletions
|
@ -9,7 +9,10 @@ let
|
||||||
cfg = config.oci;
|
cfg = config.oci;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./oci-common.nix ];
|
imports = [
|
||||||
|
./oci-common.nix
|
||||||
|
../image/file-options.nix
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# Use a priority just below mkOptionDefault (1500) instead of lib.mkDefault
|
# Use a priority just below mkOptionDefault (1500) instead of lib.mkDefault
|
||||||
|
@ -17,10 +20,14 @@ in
|
||||||
virtualisation.diskSize = lib.mkOverride 1490 (8 * 1024);
|
virtualisation.diskSize = lib.mkOverride 1490 (8 * 1024);
|
||||||
virtualisation.diskSizeAutoSupported = false;
|
virtualisation.diskSizeAutoSupported = false;
|
||||||
|
|
||||||
|
system.nixos.tags = [ "oci" ];
|
||||||
|
image.extension = "qcow2";
|
||||||
|
system.build.image = config.system.build.OCIImage;
|
||||||
system.build.OCIImage = import ../../lib/make-disk-image.nix {
|
system.build.OCIImage = import ../../lib/make-disk-image.nix {
|
||||||
inherit config lib pkgs;
|
inherit config lib pkgs;
|
||||||
inherit (config.virtualisation) diskSize;
|
inherit (config.virtualisation) diskSize;
|
||||||
name = "oci-image";
|
name = "oci-image";
|
||||||
|
baseName = config.image.baseName;
|
||||||
configFile = ./oci-config-user.nix;
|
configFile = ./oci-config-user.nix;
|
||||||
format = "qcow2";
|
format = "qcow2";
|
||||||
partitionTableType = if cfg.efi then "efi" else "legacy";
|
partitionTableType = if cfg.efi then "efi" else "legacy";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue