From 1900ec1845751fcc919c6579a96802e6149307a0 Mon Sep 17 00:00:00 2001 From: Dylan Frankland Date: Sun, 11 Apr 2021 21:40:25 -0700 Subject: [PATCH] Fix copying of LXC system contents --- formats/lxc.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/formats/lxc.nix b/formats/lxc.nix index a2341d5..8991029 100644 --- a/formats/lxc.nix +++ b/formats/lxc.nix @@ -1,17 +1,22 @@ -{ config, pkgs, lib, modulesPath, ... }: let - pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l; -in { +{ config, pkgs, lib, modulesPath, ... }: + +{ imports = [ "${toString modulesPath}/virtualisation/lxc-container.nix" ]; system.build.tarball = lib.mkForce (pkgs.callPackage { - contents = []; extraArgs = "--owner=0"; storeContents = [ { - object = config.system.build.toplevel + "/init"; - symlink = "/sbin/init"; + object = config.system.build.toplevel; + symlink = "none"; + } + ]; + contents = [ + { + source = config.system.build.toplevel + "/init"; + target = "/sbin/init"; } ];