rescue boot
This commit is contained in:
parent
743d86da5b
commit
ebdbdacba4
6 changed files with 54 additions and 9 deletions
33
nixos/hosts/thalassa/null/rescue-boot.nix
Normal file
33
nixos/hosts/thalassa/null/rescue-boot.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
netboot = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
inherit (pkgs) system;
|
||||
modules = [
|
||||
(pkgs.path + "/nixos/modules/installer/netboot/netboot-minimal.nix")
|
||||
module
|
||||
];
|
||||
};
|
||||
module = {
|
||||
system.stateVersion = "22.11";
|
||||
boot.supportedFilesystems = [ "btrfs" "ext4" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
];
|
||||
};
|
||||
in {
|
||||
boot.loader.systemd-boot = {
|
||||
extraEntries = {
|
||||
"rescue.conf" = ''
|
||||
title Rescue Boot
|
||||
linux /rescue-kernel
|
||||
initrd /rescue-initrd
|
||||
options init=${netboot.config.system.build.toplevel}/init ${toString netboot.config.boot.kernelParams}
|
||||
'';
|
||||
};
|
||||
|
||||
extraFiles = {
|
||||
"rescue-kernel" = "${netboot.config.system.build.kernel}/bzImage";
|
||||
"rescue-initrd" = "${netboot.config.system.build.netbootRamdisk}/initrd";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue