summaryrefslogtreecommitdiff
path: root/hosts/vidhar/network/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vidhar/network/dhcp')
-rw-r--r--hosts/vidhar/network/dhcp/default.nix25
1 files changed, 12 insertions, 13 deletions
diff --git a/hosts/vidhar/network/dhcp/default.nix b/hosts/vidhar/network/dhcp/default.nix
index 22991094..f36d0c7f 100644
--- a/hosts/vidhar/network/dhcp/default.nix
+++ b/hosts/vidhar/network/dhcp/default.nix
@@ -7,8 +7,7 @@ let
7 tftpIp = "10.141.0.1"; 7 tftpIp = "10.141.0.1";
8 ipxe = pkgs.ipxe.override { 8 ipxe = pkgs.ipxe.override {
9 additionalTargets = { 9 additionalTargets = {
10 "bin-i386-efi/snponly.efi" = "i386-snponly.efi"; 10 "bin-i386-efi/ipxe.efi" = "i386-ipxe.efi";
11 "bin-x86_64-efi/snponly.efi" = "snponly.efi";
12 }; 11 };
13 additionalOptions = [ 12 additionalOptions = [
14 "NSLOOKUP_CMD" 13 "NSLOOKUP_CMD"
@@ -66,23 +65,23 @@ in {
66 option-data = [ 65 option-data = [
67 { name = "vendor-class-identifier"; data = "HTTPClient"; } 66 { name = "vendor-class-identifier"; data = "HTTPClient"; }
68 ]; 67 ];
69 boot-file-name = "${nfsrootBaseUrl}/snponly.efi"; 68 boot-file-name = "${nfsrootBaseUrl}/ipxe.efi";
70 only-if-required = true; 69 only-if-required = true;
71 } 70 }
72 71
73 { name = "ipxe-uefi-64"; 72 { name = "ipxe-uefi-64";
74 test = "option[77].hex == 'iPXE' and (substring(option[60].hex,0,20) == 'PXEClient:Arch:00007' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00008' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00009')"; 73 test = "option[77].hex == 'iPXE' and (substring(option[60].hex,0,20) == 'PXEClient:Arch:00007' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00008' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00009')";
75 boot-file-name = "${nfsrootBaseUrl}/snponly.efi"; 74 boot-file-name = "${nfsrootBaseUrl}/ipxe.efi";
76 only-if-required = true; 75 only-if-required = true;
77 } 76 }
78 { name = "ipxe-uefi-32"; 77 { name = "ipxe-uefi-32";
79 test = "option[77].hex == 'iPXE' and (substring(option[60].hex,0,20) == 'PXEClient:Arch:00002' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00006')"; 78 test = "option[77].hex == 'iPXE' and (substring(option[60].hex,0,20) == 'PXEClient:Arch:00002' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00006')";
80 boot-file-name = "${nfsrootBaseUrl}/i386-snponly.efi"; 79 boot-file-name = "${nfsrootBaseUrl}/i386-ipxe.efi";
81 only-if-required = true; 80 only-if-required = true;
82 } 81 }
83 { name = "ipxe-legacy"; 82 { name = "ipxe-legacy";
84 test = "option[77].hex == 'iPXE' and substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'"; 83 test = "option[77].hex == 'iPXE' and substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'";
85 boot-file-name = "${nfsrootBaseUrl}/undionly.kpxe"; 84 boot-file-name = "${nfsrootBaseUrl}/ipxe.lkrn";
86 only-if-required = true; 85 only-if-required = true;
87 } 86 }
88 87
@@ -91,7 +90,7 @@ in {
91 option-data = [ 90 option-data = [
92 { name = "tftp-server-name"; data = tftpIp; } 91 { name = "tftp-server-name"; data = tftpIp; }
93 ]; 92 ];
94 boot-file-name = "snponly.efi"; 93 boot-file-name = "ipxe.efi";
95 only-if-required = true; 94 only-if-required = true;
96 } 95 }
97 { name = "uefi-32"; 96 { name = "uefi-32";
@@ -99,7 +98,7 @@ in {
99 option-data = [ 98 option-data = [
100 { name = "tftp-server-name"; data = tftpIp; } 99 { name = "tftp-server-name"; data = tftpIp; }
101 ]; 100 ];
102 boot-file-name = "i386-snponly.efi"; 101 boot-file-name = "i386-ipxe.efi";
103 only-if-required = true; 102 only-if-required = true;
104 } 103 }
105 { name = "legacy"; 104 { name = "legacy";
@@ -107,7 +106,7 @@ in {
107 option-data = [ 106 option-data = [
108 { name = "tftp-server-name"; data = tftpIp; } 107 { name = "tftp-server-name"; data = tftpIp; }
109 ]; 108 ];
110 boot-file-name = "undionly.kpxe"; 109 boot-file-name = "ipxe.lkrn";
111 only-if-required = true; 110 only-if-required = true;
112 } 111 }
113 ]; 112 ];
@@ -351,7 +350,7 @@ in {
351 goto start 350 goto start
352 351
353 :memtest 352 :memtest
354 iseq ''${platform} efi && chain --autofree memtest.efi dark || chain --autofree memtest.bin dark 353 iseq ''${platform} efi && chain --autofree memtest.efi || chain --autofree memtest.bin
355 goto start 354 goto start
356 ''; 355 '';
357 }) 356 })
@@ -361,7 +360,7 @@ in {
361 (pkgs.runCommandLocal "utils" {} '' 360 (pkgs.runCommandLocal "utils" {} ''
362 mkdir $out 361 mkdir $out
363 install -m 0444 -t $out \ 362 install -m 0444 -t $out \
364 ${ipxe}/{snponly.efi,i386-snponly.efi,undionly.kpxe} \ 363 ${ipxe}/{ipxe.efi,i386-ipxe.efi,ipxe.lkrn} \
365 ${pkgs.memtest86plus}/{memtest.efi,memtest.bin} 364 ${pkgs.memtest86plus}/{memtest.efi,memtest.bin}
366 install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi 365 install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi
367 install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn 366 install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn
@@ -415,7 +414,7 @@ in {
415 goto start 414 goto start
416 415
417 :memtest 416 :memtest
418 iseq ''${platform} efi && chain --autofree memtest.efi dark || chain --autofree memtest.bin dark 417 iseq ''${platform} efi && chain --autofree memtest.efi || chain --autofree memtest.bin
419 goto start 418 goto start
420 ''; 419 '';
421 }) 420 })
@@ -432,7 +431,7 @@ in {
432 tftpRoot = pkgs.runCommandLocal "netboot" {} '' 431 tftpRoot = pkgs.runCommandLocal "netboot" {} ''
433 mkdir -p $out 432 mkdir -p $out
434 install -m 0444 -t $out \ 433 install -m 0444 -t $out \
435 ${ipxe}/{snponly.efi,i386-snponly.efi,undionly.kpxe} 434 ${ipxe}/{ipxe.efi,i386-ipxe.efi,ipxe.lkrn}
436 ''; 435 '';
437 in "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address=${tftpIp} ${tftpRoot}"; 436 in "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address=${tftpIp} ${tftpRoot}";
438 }; 437 };