From 0de15ae2403694b02de584ed5eee38d7c6e27b8b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 25 Nov 2026 09:48:16 +0100 Subject: ... --- hosts/vidhar/network/dhcp/default.nix | 102 ++++++++-------------------------- 1 file changed, 24 insertions(+), 78 deletions(-) (limited to 'hosts/vidhar/network/dhcp/default.nix') diff --git a/hosts/vidhar/network/dhcp/default.nix b/hosts/vidhar/network/dhcp/default.nix index e4c3f16e..2efabd23 100644 --- a/hosts/vidhar/network/dhcp/default.nix +++ b/hosts/vidhar/network/dhcp/default.nix @@ -48,12 +48,6 @@ in { }; client-classes = [ - # { name = "ipxe-eostre"; - # test = "hexstring(pkt4.mac, ':') == '00:d8:61:79:c5:40' and option[77].hex == 'iPXE-yggdrasil'"; - # next-server = tftpIp; - # boot-file-name = "${nfsrootBaseUrl}/eostre.menu.ipxe"; - # only-if-required = true; - # } { name = "ipxe-yggdrasil"; test = "option[77].hex == 'iPXE-yggdrasil'"; next-server = tftpIp; @@ -294,43 +288,46 @@ in { name = "installer-${system}"; paths = [ (builtins.addErrorContext "while evaluating installer-${system}-nfsroot" (let - installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { - modules = [ - ({ ... }: { - config.nfsroot.storeDevice = "${nfsIp}:nix-store"; - config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; - config.system.nixos.label = "installer-${system}"; - }) - ]; - }); - installerBuild = installerBuild'.config.system.build; + # installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { + # modules = [ + # ({ ... }: { + # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; + # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; + # config.system.nixos.label = "installer-${system}"; + # }) + # ]; + # }); + # installerBuild = installerBuild'.config.system.build; + + # install -m 0444 -t $out/installer-${system} \ + # ${installerBuild.initialRamdisk}/initrd \ + # ${installerBuild.kernel}/bzImage \ + # ${installerBuild.netbootIpxeScript}/netboot.ipxe \ + # ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration + + # item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} + + # :installer + # chain installer-${system}/netboot.ipxe + # goto start + in builtins.toPath (pkgs.runCommandLocal "installer-${system}" {} '' mkdir -p $out/installer-${system} - install -m 0444 -t $out/installer-${system} \ - ${installerBuild.initialRamdisk}/initrd \ - ${installerBuild.kernel}/bzImage \ - ${installerBuild.netbootIpxeScript}/netboot.ipxe \ - ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration install -m 0444 ${pkgs.writeText "installer-${system}.menu.ipxe" '' #!ipxe :start menu iPXE boot menu for installer-${system} - item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} item memtest memtest86plus item netboot netboot.xyz item shell iPXE shell - choose --timeout 0 --default installer selected || goto shell + choose --timeout 0 --default netboot selected || goto shell goto ''${selected} :shell shell goto start - :installer - chain installer-${system}/netboot.ipxe - goto start - :netboot iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn goto start @@ -351,57 +348,6 @@ in { install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn '') - # (builtins.addErrorContext "while evaluating eostre" (let - # eostreBuild' = (flake.nixosConfigurations.eostre.extendModules { - # modules = [ - # ({ ... }: { - # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; - # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/eostre/registration"; - # config.system.nixos.label = "eostre"; - # }) - # ]; - # }); - # eostreBuild = eostreBuild'.config.system.build; - # in builtins.toPath (pkgs.runCommandLocal "eostre" {} '' - # mkdir -p $out/eostre - # install -m 0444 -t $out/eostre \ - # ${eostreBuild.initialRamdisk}/initrd \ - # ${eostreBuild.kernel}/bzImage \ - # ${eostreBuild.netbootIpxeScript}/netboot.ipxe \ - # ${pkgs.closureInfo { rootPaths = eostreBuild.storeContents; }}/registration - # install -m 0444 ${pkgs.writeText "eostre.menu.ipxe" '' - # #!ipxe - - # set menu-timeout 5000 - - # :start - # menu iPXE boot menu for eostre - # item eostre ${with eostreBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} - # item memtest memtest86plus - # item netboot netboot.xyz - # item shell iPXE shell - # choose --timeout ''${menu-timeout} --default eostre selected || goto shell - # set menu-timeout 0 - # goto ''${selected} - - # :shell - # set menu-timeout 0 - # shell - # goto start - - # :eostre - # chain eostre/netboot.ipxe - # goto start - - # :netboot - # iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn - # goto start - - # :memtest - # chain --autofree mt86plus.efi - # goto start - # ''} $out/eostre.menu.ipxe - # ''))) ]; }; }; -- cgit v1.2.3