mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-09-11 12:15:29 +03:00
formats: repair kexec
This commit is contained in:
parent
9191c85aab
commit
2ed5842458
@ -3,33 +3,28 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
options,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
clever-tests = builtins.fetchGit {
|
|
||||||
url = "https://github.com/cleverca22/nix-tests";
|
|
||||||
rev = "a9a316ad89bfd791df4953c1a8b4e8ed77995a18"; # master on 2021-06-13
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit (import ../lib.nix {inherit lib options;}) maybe;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
"${toString modulesPath}/installer/netboot/netboot-minimal.nix"
|
(modulesPath + "/installer/netboot/netboot-minimal.nix")
|
||||||
"${clever-tests}/kexec/autoreboot.nix"
|
|
||||||
"${clever-tests}/kexec/kexec.nix"
|
|
||||||
"${clever-tests}/kexec/justdoit.nix"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.build = rec {
|
system.build = rec {
|
||||||
kexec_tarball = maybe.mkForce (pkgs.callPackage "${toString modulesPath}/../lib/make-system-tarball.nix" {
|
kexec_tarball = pkgs.callPackage "${toString modulesPath}/../lib/make-system-tarball.nix" {
|
||||||
storeContents = [
|
storeContents = [
|
||||||
{
|
{
|
||||||
object = config.system.build.kexec_script;
|
object = pkgs.writeScript "kexec" ''
|
||||||
|
kexec \
|
||||||
|
--load ${config.system.build.toplevel}/kernel \
|
||||||
|
--initrd ${config.system.build.toplevel}/initrd \
|
||||||
|
--command-line "$(</proc/cmdline)"
|
||||||
|
'';
|
||||||
symlink = "/kexec_nixos";
|
symlink = "/kexec_nixos";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
contents = [];
|
contents = [];
|
||||||
});
|
};
|
||||||
|
|
||||||
kexec_tarball_self_extract_script = pkgs.writeTextFile {
|
kexec_tarball_self_extract_script = pkgs.writeTextFile {
|
||||||
executable = true;
|
executable = true;
|
Loading…
Reference in New Issue
Block a user