diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-14 16:08:46 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-14 16:08:46 +0100 |
commit | 67ad77720622605af0ec366fb068d9c9da320231 (patch) | |
tree | 96ce7c47d9e148a8e9bf360090ebd592fb562b3c /hosts/vidhar | |
parent | d4240be827e9527f6bb5a950b2563f495ae3849a (diff) | |
download | nixos-67ad77720622605af0ec366fb068d9c9da320231.tar nixos-67ad77720622605af0ec366fb068d9c9da320231.tar.gz nixos-67ad77720622605af0ec366fb068d9c9da320231.tar.bz2 nixos-67ad77720622605af0ec366fb068d9c9da320231.tar.xz nixos-67ad77720622605af0ec366fb068d9c9da320231.zip |
vidhar: 32bit ipxe
Diffstat (limited to 'hosts/vidhar')
-rw-r--r-- | hosts/vidhar/network/default.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/hosts/vidhar/network/default.nix b/hosts/vidhar/network/default.nix index 7f04dfde..2d9a7b8f 100644 --- a/hosts/vidhar/network/default.nix +++ b/hosts/vidhar/network/default.nix | |||
@@ -86,6 +86,14 @@ | |||
86 | ]; | 86 | ]; |
87 | boot-file-name = "ipxe.efi"; | 87 | boot-file-name = "ipxe.efi"; |
88 | } | 88 | } |
89 | { name = "uefi-32"; | ||
90 | test = "substring(option[60].hex,0,20) == 'PXEClient:Arch:00002' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00006'"; | ||
91 | only-if-required = true; | ||
92 | option-data = [ | ||
93 | { name = "tftp-server-name"; data = "10.141.0.1"; } | ||
94 | ]; | ||
95 | boot-file-name = "i386-ipxe.efi"; | ||
96 | } | ||
89 | { name = "legacy"; | 97 | { name = "legacy"; |
90 | test = "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'"; | 98 | test = "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'"; |
91 | only-if-required = true; | 99 | only-if-required = true; |
@@ -114,7 +122,7 @@ | |||
114 | ]; | 122 | ]; |
115 | pools = [ { pool = "10.141.0.128 - 10.141.0.254"; } ]; | 123 | pools = [ { pool = "10.141.0.128 - 10.141.0.254"; } ]; |
116 | reservations = []; | 124 | reservations = []; |
117 | require-client-classes = ["ipxe" "uefi-64" "legacy"]; | 125 | require-client-classes = ["ipxe" "uefi-64" "uefi-32" "legacy"]; |
118 | } | 126 | } |
119 | { subnet = "10.141.1.0/24"; | 127 | { subnet = "10.141.1.0/24"; |
120 | option-data = [ | 128 | option-data = [ |
@@ -190,13 +198,18 @@ | |||
190 | wantedBy = [ "multi-user.target" ]; | 198 | wantedBy = [ "multi-user.target" ]; |
191 | serviceConfig.ExecStart = let | 199 | serviceConfig.ExecStart = let |
192 | installerBuild = flake.nixosConfigurations.installer-x86_64-linux-netboot.config.system.build; | 200 | installerBuild = flake.nixosConfigurations.installer-x86_64-linux-netboot.config.system.build; |
201 | ipxe = pkgs.ipxe.override { | ||
202 | additionalTargets = { | ||
203 | "bin-i386-efi/ipxe.efi" = "i386-ipxe.efi"; | ||
204 | }; | ||
205 | }; | ||
193 | tftpRoot = pkgs.runCommandLocal "installer-netboot" {} '' | 206 | tftpRoot = pkgs.runCommandLocal "installer-netboot" {} '' |
194 | mkdir -p $out | 207 | mkdir -p $out |
195 | install -m 0444 -t $out \ | 208 | install -m 0444 -t $out \ |
196 | ${installerBuild.netbootRamdisk}/initrd \ | 209 | ${installerBuild.netbootRamdisk}/initrd \ |
197 | ${installerBuild.kernel}/bzImage \ | 210 | ${installerBuild.kernel}/bzImage \ |
198 | ${installerBuild.netbootIpxeScript}/netboot.ipxe \ | 211 | ${installerBuild.netbootIpxeScript}/netboot.ipxe \ |
199 | ${pkgs.ipxe}/ipxe.efi ${pkgs.ipxe}/undionly.kpxe | 212 | ${ipxe}/ipxe.efi ${ipxe}/i386-ipxe.efi ${ipxe}/undionly.kpxe |
200 | ''; | 213 | ''; |
201 | in "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address=10.141.0.1 ${tftpRoot}"; | 214 | in "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address=10.141.0.1 ${tftpRoot}"; |
202 | }; | 215 | }; |