This commit is contained in:
2026-01-28 20:34:48 +00:00
parent 01049996da
commit b4678effc0
8 changed files with 167 additions and 2 deletions

View File

@@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
version = "3.23.3";
src = fetchurl {
url = "https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/alpine-netboot-${version}-x86_64.tar.gz";
urls = [
"https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/alpine-netboot-${version}-x86_64.tar.gz"
"https://dl.jakstys.lt/boot/alpine-netboot-${version}-x86_64.tar.gz"
];
hash = "sha256-U/tUZvdhLU/2Fr3g9jfwuM0mfX5SrtxwUiD0h+Qx8VA=";
};

View File

@@ -14,7 +14,10 @@ stdenv.mkDerivation rec {
inherit version;
src = fetchurl {
url = "https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-${flavor}.iso";
urls = [
"https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-${flavor}.iso"
"https://dl.jakstys.lt/boot/debian-live-${version}-amd64-${flavor}.iso"
];
inherit hash;
};

55
pkgs/mrescue-nixos.nix Normal file
View File

@@ -0,0 +1,55 @@
{
pkgs,
stdenv,
fetchurl,
}:
let
# NixOS netboot files from nix-community/nixos-images
# Source: https://github.com/nix-community/nixos-images/releases
version = "25.11";
kernel = fetchurl {
urls = [
"https://dl.jakstys.lt/boot/nixos-${version}-bzImage-x86_64-linux"
"https://github.com/nix-community/nixos-images/releases/download/nixos-${version}/bzImage-x86_64-linux"
];
hash = "sha256-ClUTxNU8YQfA8yo0vKx32fxl5Q3atXDXvGyIJP2OTpU=";
};
initrd =
(fetchurl {
urls = [
"https://dl.jakstys.lt/boot/nixos-${version}-initrd-x86_64-linux"
"https://github.com/nix-community/nixos-images/releases/download/nixos-${version}/initrd-x86_64-linux"
];
hash = "sha256-0nLNJVrjxIKQCTPB3iz4N3j6OyQEJ2G0JTluhHOTpPU=";
}).overrideAttrs
(_: {
__structuredAttrs = true;
unsafeDiscardReferences.out = true;
});
in
stdenv.mkDerivation rec {
pname = "mrescue-nixos";
inherit version;
dontUnpack = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
install -Dm644 ${kernel} $out/kernel
install -Dm644 ${initrd} $out/initrd
runHook postInstall
'';
meta = with pkgs.lib; {
description = "NixOS minimal netboot files for rescue purposes";
homepage = "https://github.com/nix-community/nixos-images";
platforms = platforms.linux;
};
}