Remove the kexec tarball
This commit is contained in:
parent
614cfb8f8e
commit
ded46403ec
3 changed files with 0 additions and 72 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -13,8 +13,6 @@ jobs:
|
||||||
- nixos-8gb-fsn1-1.x86_64-linux
|
- nixos-8gb-fsn1-1.x86_64-linux
|
||||||
- nutty-noon.x86_64-linux
|
- nutty-noon.x86_64-linux
|
||||||
- thinkrac.x86_64-linux
|
- thinkrac.x86_64-linux
|
||||||
- aarch64-kexec.aarch64-linux
|
|
||||||
- aarch64-kexec-tarball
|
|
||||||
- instance-20221213-1915.aarch64-linux
|
- instance-20221213-1915.aarch64-linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
# Adapted from https://github.com/cleverca22/nix-tests/tree/master/kexec
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
nixpkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
"${nixpkgs}/nixos/modules/installer/netboot/netboot-minimal.nix"
|
|
||||||
];
|
|
||||||
networking.hostName = "nixos";
|
|
||||||
networking.hostId = "d5b14b97";
|
|
||||||
boot.kernelParams = ["net.ifnames=0"];
|
|
||||||
system.stateVersion = "22.11";
|
|
||||||
system.build = rec {
|
|
||||||
image = pkgs.runCommand "image" {buildInputs = [pkgs.nukeReferences];} ''
|
|
||||||
mkdir $out
|
|
||||||
cp ${config.system.build.kernel}/${config.system.boot.loader.kernelFile} $out/kernel
|
|
||||||
cp ${config.system.build.netbootRamdisk}/initrd $out/initrd
|
|
||||||
echo "init=${builtins.unsafeDiscardStringContext config.system.build.toplevel}/init ${toString config.boot.kernelParams}" > $out/cmdline
|
|
||||||
nuke-refs $out/kernel
|
|
||||||
'';
|
|
||||||
kexec_script = pkgs.writeTextFile {
|
|
||||||
executable = true;
|
|
||||||
name = "kexec-nixos";
|
|
||||||
text = ''
|
|
||||||
#!${pkgs.stdenv.shell}
|
|
||||||
export PATH=${pkgs.kexectools}/bin:${pkgs.cpio}/bin:$PATH
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
cd $(mktemp -d)
|
|
||||||
pwd
|
|
||||||
mkdir initrd
|
|
||||||
pushd initrd
|
|
||||||
if [ -e /ssh_pubkey ]; then
|
|
||||||
cat /ssh_pubkey >> authorized_keys
|
|
||||||
fi
|
|
||||||
find -type f | cpio -o -H newc | gzip -9 > ../extra.gz
|
|
||||||
popd
|
|
||||||
cat ${image}/initrd extra.gz > final.gz
|
|
||||||
kexec -l ${image}/kernel --initrd=final.gz --append="init=${builtins.unsafeDiscardStringContext config.system.build.toplevel}/init ${toString config.boot.kernelParams}"
|
|
||||||
sync
|
|
||||||
echo "executing kernel, filesystems will be improperly umounted"
|
|
||||||
kexec -e
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
boot.initrd.postMountCommands = ''
|
|
||||||
mkdir -p /mnt-root/root/.ssh/
|
|
||||||
cp /authorized_keys /mnt-root/root/.ssh/
|
|
||||||
'';
|
|
||||||
system.build.kexec_tarball = pkgs.callPackage "${nixpkgs}/nixos/lib/make-system-tarball.nix" {
|
|
||||||
storeContents = [
|
|
||||||
{
|
|
||||||
object = config.system.build.kexec_script;
|
|
||||||
symlink = "/kexec_nixos";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
contents = [];
|
|
||||||
};
|
|
||||||
networking.wireguard.interfaces."wg0".ips = [
|
|
||||||
"fd0d:a262:1fa6:e621:6ec2:1e4e:ce7f:d2af/64"
|
|
||||||
];
|
|
||||||
boot.supportedFilesystems = ["zfs"];
|
|
||||||
}
|
|
|
@ -95,10 +95,6 @@ rec {
|
||||||
name = "nas"; # My nas
|
name = "nas"; # My nas
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "aarch64-kexec"; # kexec tarball for aarch64
|
|
||||||
system = "aarch64-linux";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "instance-20221213-1915"; # Oracle server
|
name = "instance-20221213-1915"; # Oracle server
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
|
@ -170,7 +166,6 @@ rec {
|
||||||
systems))
|
systems))
|
||||||
// {
|
// {
|
||||||
inherit devShell;
|
inherit devShell;
|
||||||
aarch64-kexec-tarball = nixosConfigurations.aarch64-kexec.config.system.build.kexec_tarball;
|
|
||||||
# Uncomment the line to build an installer image
|
# Uncomment the line to build an installer image
|
||||||
# This is EXTREMELY LARGE and will make builds take forever
|
# This is EXTREMELY LARGE and will make builds take forever
|
||||||
# installer.x86_64-linux = nixosConfigurations.installer.config.system.build.isoImage;
|
# installer.x86_64-linux = nixosConfigurations.installer.config.system.build.isoImage;
|
||||||
|
|
Loading…
Reference in a new issue