From 2ed5842458829312e5e05393f240bb4f05eea4a6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 16 Jul 2023 21:08:40 +0200 Subject: [PATCH] formats: repair kexec --- {formats-broken => formats}/kexec.nix | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) rename {formats-broken => formats}/kexec.nix (67%) diff --git a/formats-broken/kexec.nix b/formats/kexec.nix similarity index 67% rename from formats-broken/kexec.nix rename to formats/kexec.nix index ef17df3..b1d7c28 100644 --- a/formats-broken/kexec.nix +++ b/formats/kexec.nix @@ -3,33 +3,28 @@ pkgs, lib, 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 = [ - "${toString modulesPath}/installer/netboot/netboot-minimal.nix" - "${clever-tests}/kexec/autoreboot.nix" - "${clever-tests}/kexec/kexec.nix" - "${clever-tests}/kexec/justdoit.nix" + (modulesPath + "/installer/netboot/netboot-minimal.nix") ]; 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 = [ { - 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 "$(