diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2021-04-28 05:09:30 +0200 |
---|---|---|
committer | Maciej Krüger <mkg20001@gmail.com> | 2021-11-03 07:49:51 +0100 |
commit | 1c7a7f198c319dbc1b67c6ad0124b9c6c5f34cd4 (patch) | |
tree | 294896dd2383257ccbb759b828fc2dbf81ca116e /nixos/modules/virtualisation | |
parent | d203189dbfbd7a6887f1e85adbe2ac7fe579dfef (diff) | |
download | nixpkgs-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.nix | 27 |
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"; }); |