-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.nix
54 lines (49 loc) · 1.48 KB
/
boot.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ config, pkgs, ... }:
{
boot.loader = {
# UEFI
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
# SYSTEMD-BOOT
systemd-boot = { enable = false; };
# GRUB2
grub = {
enable = true;
efiSupport = true;
memtest86.enable = true;
fsIdentifier = "label";
devices = [ "nodev" ];
useOSProber = true;
splashImage = "/share/background.png";
backgroundColor = "#7EBAE4";
fontSize = 24;
gfxmodeEfi = "1920x1080";
# extraConfig = '' set timeout_style=hidden '';
extraEntries = ''
menuentry "netboot.xyz" {
insmod fat
insmod loopback
insmod chain
insmod iso9660 # Für ISO-Container
search --set=root --file /boot/netboot.xyz.iso # ISO finden und Root-Device def.
loopback loop /boot/netboot.xyz.iso # macht die ISO als virtuelles Laufwerk verfügbar
chainloader (loop)/EFI/BOOT/BOOTX64.EFI # Standard-EFI-Pfad für x86_64 Systeme
}
menuentry "Reboot" { reboot }
menuentry "Poweroff" { halt }
'';
};
};
# ISO-Datei bereitstellen (optional per Download)
/* environment.etc."netboot.xyz.iso" = {
source = pkgs.fetchurl {
url = "https://github.com/netbootxyz/netboot.xyz/releases/download/2.0.72/netboot.xyz.iso";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Aktuelle Hash eintragen!
};
target = "var/lib/netboot/netboot.xyz.iso";
};
}
*/
}