about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2021-05-28 22:00:37 -0400
committerThiago Kenji Okada <thiagokokada@gmail.com>2023-09-21 22:57:38 +0100
commitd944fb4a19bc55729e7dac824bde69e600df3d8f (patch)
tree9bb9cacca1be92524cded975f7e1ae416ee6c1f3 /nixos
parent9849ccb2417d8de68b2c568bee8d58d41953d6b4 (diff)
downloadnixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.tar
nixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.tar.gz
nixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.tar.bz2
nixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.tar.lz
nixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.tar.xz
nixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.tar.zst
nixlib-d944fb4a19bc55729e7dac824bde69e600df3d8f.zip
nixos/virtualization: Allow building EFI OCI images
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/oci-image.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/oci-image.nix b/nixos/modules/virtualisation/oci-image.nix
index 58a32b16aada..d4af5016dd71 100644
--- a/nixos/modules/virtualisation/oci-image.nix
+++ b/nixos/modules/virtualisation/oci-image.nix
@@ -1,5 +1,8 @@
 { config, lib, pkgs, ... }:
 
+let
+  cfg = config.oci;
+in
 {
   imports = [ ./oci-common.nix ];
 
@@ -10,6 +13,7 @@
       configFile = ./oci-config-user.nix;
       format = "qcow2";
       diskSize = 8192;
+      partitionTableType = if cfg.efi then "efi" else "legacy";
     };
 
     systemd.services.fetch-ssh-keys = {