From 4259f7575e5a715bf4001e22894ce95cdc06385a Mon Sep 17 00:00:00 2001 From: Ding Xiang Fei Date: Tue, 30 Oct 2018 15:44:00 +0800 Subject: use closure-info for building system tarball --- nixos/modules/profiles/docker-container.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'nixos/modules/profiles') diff --git a/nixos/modules/profiles/docker-container.nix b/nixos/modules/profiles/docker-container.nix index 7031d7d1d593..5d6b11498b52 100644 --- a/nixos/modules/profiles/docker-container.nix +++ b/nixos/modules/profiles/docker-container.nix @@ -15,15 +15,19 @@ in { # Create the tarball system.build.tarball = pkgs.callPackage ../../lib/make-system-tarball.nix { - contents = []; + contents = [ + { + source = "${config.system.build.toplevel}/."; + target = "./"; + } + ]; extraArgs = "--owner=0"; # Add init script to image - storeContents = [ - { object = config.system.build.toplevel + "/init"; - symlink = "/init"; - } - ] ++ (pkgs2storeContents [ pkgs.stdenv ]); + storeContents = pkgs2storeContents [ + config.system.build.toplevel + pkgs.stdenv + ]; # Some container managers like lxc need these extraCommands = "mkdir -p proc sys dev"; -- cgit 1.4.1