mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-23 02:45:29 +03:00
lxc: use new files from nixpkgs directly
This commit is contained in:
parent
d8fa9dc9ad
commit
95d2f83c5d
@ -1,18 +1,9 @@
|
|||||||
{ config, pkgs, modulesPath, ... }:
|
{ config, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
system.build.metadata = pkgs.callPackage "${toString modulesPath}/../lib/make-system-tarball.nix" {
|
imports = [
|
||||||
contents = [{
|
"${toString modulesPath}/virtualisation/lxc-container.nix"
|
||||||
source = pkgs.writeText "metadata.yaml" ''
|
];
|
||||||
architecture: x86_64
|
|
||||||
creation_date: 1424284563
|
|
||||||
properties:
|
|
||||||
description: NixOS
|
|
||||||
os: NixOS
|
|
||||||
release: ${config.system.stateVersion}
|
|
||||||
'';
|
|
||||||
target = "/metadata.yaml";
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
formatAttr = "metadata";
|
formatAttr = "metadata";
|
||||||
filename = "*/tarball/*.tar.xz";
|
filename = "*/tarball/*.tar.xz";
|
||||||
|
@ -5,24 +5,6 @@
|
|||||||
"${toString modulesPath}/virtualisation/lxc-container.nix"
|
"${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";
|
formatAttr = "tarball";
|
||||||
filename = "*/tarball/*.tar.xz";
|
filename = "*/tarball/*.tar.xz";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user