mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
modules/netboot: add system.build.image for new kexecTarball
This commit is contained in:
parent
53e68e04f2
commit
63d0a4ea61
1 changed files with 20 additions and 1 deletions
|
@ -1,11 +1,15 @@
|
||||||
# This module creates netboot media containing the given NixOS
|
# This module creates netboot media containing the given NixOS
|
||||||
# configuration.
|
# configuration.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../../image/file-options.nix
|
||||||
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
netboot.squashfsCompression = mkOption {
|
netboot.squashfsCompression = mkOption {
|
||||||
|
@ -129,6 +133,21 @@ with lib;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
image.extension = "tar.xz";
|
||||||
|
image.filePath = "tarball/${config.image.fileName}";
|
||||||
|
system.nixos.tags = [ "kexec" ];
|
||||||
|
system.build.image = config.system.build.kexecTarball;
|
||||||
|
system.build.kexecTarball = pkgs.callPackage "${toString modulesPath}/../lib/make-system-tarball.nix" {
|
||||||
|
fileName = config.image.baseName;
|
||||||
|
storeContents = [
|
||||||
|
{
|
||||||
|
object = config.system.build.kexecScript;
|
||||||
|
symlink = "/kexec_nixos";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
contents = [];
|
||||||
|
};
|
||||||
|
|
||||||
boot.loader.timeout = 10;
|
boot.loader.timeout = 10;
|
||||||
|
|
||||||
boot.postBootCommands = ''
|
boot.postBootCommands = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue