summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2021-04-28 05:09:30 +0200
committerMaciej Krüger <mkg20001@gmail.com>2021-11-03 07:49:51 +0100
commit1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4 (patch)
tree294896dd2383257ccbb759b828fc2dbf81ca116e /nixos/modules/virtualisation
parentd203189dbfbd7a6887f1e85adbe2ac7fe579dfef (diff)
downloadnixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.tar
nixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.tar.gz
nixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.tar.bz2
nixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.tar.lz
nixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.tar.xz
nixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.tar.zst
nixpkgs-1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4.zip
virtualisation.lxc: split meta and root
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/lxc-container.nix27
1 files changed, 16 insertions, 11 deletions
diff --git a/nixos/modules/virtualisation/lxc-container.nix b/nixos/modules/virtualisation/lxc-container.nix
index 2b45ddbc16a..9cc5c829e12 100644
--- a/nixos/modules/virtualisation/lxc-container.nix
+++ b/nixos/modules/virtualisation/lxc-container.nix
@@ -67,16 +67,7 @@ in
   };
 
   config = {
-    system.build.tarball = mkForce (pkgs.callPackage ../../lib/make-system-tarball.nix {
-      extraArgs = "--owner=0";
-
-      storeContents = [
-        {
-          object = config.system.build.toplevel;
-          symlink = "none";
-        }
-      ];
-
+    system.build.metadata = pkgs.callPackage ../../lib/make-system-tarball.nix {
       contents = [
         {
           source = toYAML "metadata.yaml" {
@@ -91,11 +82,25 @@ in
           };
           target = "/metadata.yaml";
         }
+      ] ++ templates.files;
+    };
+
+    system.build.tarball = mkForce (pkgs.callPackage ../../lib/make-system-tarball.nix {
+      extraArgs = "--owner=0";
+
+      storeContents = [
+        {
+          object = config.system.build.toplevel;
+          symlink = "none";
+        }
+      ];
+
+      contents = [
         {
           source = config.system.build.toplevel + "/init";
           target = "/sbin/init";
         }
-      ] ++ templates.files;
+      ];
 
       extraCommands = "mkdir -p proc sys dev";
     });