lxc: use new files from nixpkgs directly

This commit is contained in:
Maciej Krüger 2021-11-03 17:43:48 +01:00
parent d8fa9dc9ad
commit 95d2f83c5d
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F
2 changed files with 4 additions and 31 deletions

View File

@ -1,18 +1,9 @@
{ config, pkgs, modulesPath, ... }:
{
system.build.metadata = pkgs.callPackage "${toString modulesPath}/../lib/make-system-tarball.nix" {
contents = [{
source = pkgs.writeText "metadata.yaml" ''
architecture: x86_64
creation_date: 1424284563
properties:
description: NixOS
os: NixOS
release: ${config.system.stateVersion}
'';
target = "/metadata.yaml";
}];
};
imports = [
"${toString modulesPath}/virtualisation/lxc-container.nix"
];
formatAttr = "metadata";
filename = "*/tarball/*.tar.xz";

View File

@ -5,24 +5,6 @@
"${toString modulesPath}/virtualisation/lxc-container.nix"
];
system.build.tarball = lib.mkForce (pkgs.callPackage "${toString modulesPath}/../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";
}
];
extraCommands = "mkdir -p proc sys dev";
});
formatAttr = "tarball";
filename = "*/tarball/*.tar.xz";
}