diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2026-11-25 09:48:16 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2026-11-25 09:48:16 +0100 |
| commit | 0de15ae2403694b02de584ed5eee38d7c6e27b8b (patch) | |
| tree | 98ec7efab3cfcb248a3808310f1a91edc4a0861f /hosts/vidhar | |
| parent | 2f83beb1ff4a0d9b4a731930a129866bd5e5d933 (diff) | |
| download | nixos-flakes.tar nixos-flakes.tar.gz nixos-flakes.tar.bz2 nixos-flakes.tar.xz nixos-flakes.zip | |
...flakes
Diffstat (limited to 'hosts/vidhar')
| -rw-r--r-- | hosts/vidhar/default.nix | 2 | ||||
| -rw-r--r-- | hosts/vidhar/network/dhcp/default.nix | 102 |
2 files changed, 24 insertions, 80 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index e97eb20b..90e08a5a 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix | |||
| @@ -8,7 +8,6 @@ with lib; | |||
| 8 | tmpfs-root zfs | 8 | tmpfs-root zfs |
| 9 | initrd-all-crypto-modules default-locale openssh rebuild-machines | 9 | initrd-all-crypto-modules default-locale openssh rebuild-machines |
| 10 | build-server | 10 | build-server |
| 11 | initrd-ssh | ||
| 12 | ]; | 11 | ]; |
| 13 | 12 | ||
| 14 | config = { | 13 | config = { |
| @@ -35,7 +34,6 @@ with lib; | |||
| 35 | 34 | ||
| 36 | initrd = { | 35 | initrd = { |
| 37 | systemd = { | 36 | systemd = { |
| 38 | enable = true; | ||
| 39 | network = { | 37 | network = { |
| 40 | enable = true; | 38 | enable = true; |
| 41 | networks = { | 39 | networks = { |
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 { | |||
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | client-classes = [ | 50 | client-classes = [ |
| 51 | # { name = "ipxe-eostre"; | ||
| 52 | # test = "hexstring(pkt4.mac, ':') == '00:d8:61:79:c5:40' and option[77].hex == 'iPXE-yggdrasil'"; | ||
| 53 | # next-server = tftpIp; | ||
| 54 | # boot-file-name = "${nfsrootBaseUrl}/eostre.menu.ipxe"; | ||
| 55 | # only-if-required = true; | ||
| 56 | # } | ||
| 57 | { name = "ipxe-yggdrasil"; | 51 | { name = "ipxe-yggdrasil"; |
| 58 | test = "option[77].hex == 'iPXE-yggdrasil'"; | 52 | test = "option[77].hex == 'iPXE-yggdrasil'"; |
| 59 | next-server = tftpIp; | 53 | next-server = tftpIp; |
| @@ -294,43 +288,46 @@ in { | |||
| 294 | name = "installer-${system}"; | 288 | name = "installer-${system}"; |
| 295 | paths = [ | 289 | paths = [ |
| 296 | (builtins.addErrorContext "while evaluating installer-${system}-nfsroot" (let | 290 | (builtins.addErrorContext "while evaluating installer-${system}-nfsroot" (let |
| 297 | installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { | 291 | # installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { |
| 298 | modules = [ | 292 | # modules = [ |
| 299 | ({ ... }: { | 293 | # ({ ... }: { |
| 300 | config.nfsroot.storeDevice = "${nfsIp}:nix-store"; | 294 | # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; |
| 301 | config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; | 295 | # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; |
| 302 | config.system.nixos.label = "installer-${system}"; | 296 | # config.system.nixos.label = "installer-${system}"; |
| 303 | }) | 297 | # }) |
| 304 | ]; | 298 | # ]; |
| 305 | }); | 299 | # }); |
| 306 | installerBuild = installerBuild'.config.system.build; | 300 | # installerBuild = installerBuild'.config.system.build; |
| 301 | |||
| 302 | # install -m 0444 -t $out/installer-${system} \ | ||
| 303 | # ${installerBuild.initialRamdisk}/initrd \ | ||
| 304 | # ${installerBuild.kernel}/bzImage \ | ||
| 305 | # ${installerBuild.netbootIpxeScript}/netboot.ipxe \ | ||
| 306 | # ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration | ||
| 307 | |||
| 308 | # item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} | ||
| 309 | |||
| 310 | # :installer | ||
| 311 | # chain installer-${system}/netboot.ipxe | ||
| 312 | # goto start | ||
| 313 | |||
| 307 | in builtins.toPath (pkgs.runCommandLocal "installer-${system}" {} '' | 314 | in builtins.toPath (pkgs.runCommandLocal "installer-${system}" {} '' |
| 308 | mkdir -p $out/installer-${system} | 315 | mkdir -p $out/installer-${system} |
| 309 | install -m 0444 -t $out/installer-${system} \ | ||
| 310 | ${installerBuild.initialRamdisk}/initrd \ | ||
| 311 | ${installerBuild.kernel}/bzImage \ | ||
| 312 | ${installerBuild.netbootIpxeScript}/netboot.ipxe \ | ||
| 313 | ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration | ||
| 314 | install -m 0444 ${pkgs.writeText "installer-${system}.menu.ipxe" '' | 316 | install -m 0444 ${pkgs.writeText "installer-${system}.menu.ipxe" '' |
| 315 | #!ipxe | 317 | #!ipxe |
| 316 | 318 | ||
| 317 | :start | 319 | :start |
| 318 | menu iPXE boot menu for installer-${system} | 320 | menu iPXE boot menu for installer-${system} |
| 319 | item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} | ||
| 320 | item memtest memtest86plus | 321 | item memtest memtest86plus |
| 321 | item netboot netboot.xyz | 322 | item netboot netboot.xyz |
| 322 | item shell iPXE shell | 323 | item shell iPXE shell |
| 323 | choose --timeout 0 --default installer selected || goto shell | 324 | choose --timeout 0 --default netboot selected || goto shell |
| 324 | goto ''${selected} | 325 | goto ''${selected} |
| 325 | 326 | ||
| 326 | :shell | 327 | :shell |
| 327 | shell | 328 | shell |
| 328 | goto start | 329 | goto start |
| 329 | 330 | ||
| 330 | :installer | ||
| 331 | chain installer-${system}/netboot.ipxe | ||
| 332 | goto start | ||
| 333 | |||
| 334 | :netboot | 331 | :netboot |
| 335 | iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn | 332 | iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn |
| 336 | goto start | 333 | goto start |
| @@ -351,57 +348,6 @@ in { | |||
| 351 | install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi | 348 | install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi |
| 352 | install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn | 349 | install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn |
| 353 | '') | 350 | '') |
| 354 | # (builtins.addErrorContext "while evaluating eostre" (let | ||
| 355 | # eostreBuild' = (flake.nixosConfigurations.eostre.extendModules { | ||
| 356 | # modules = [ | ||
| 357 | # ({ ... }: { | ||
| 358 | # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; | ||
| 359 | # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/eostre/registration"; | ||
| 360 | # config.system.nixos.label = "eostre"; | ||
| 361 | # }) | ||
| 362 | # ]; | ||
| 363 | # }); | ||
| 364 | # eostreBuild = eostreBuild'.config.system.build; | ||
| 365 | # in builtins.toPath (pkgs.runCommandLocal "eostre" {} '' | ||
| 366 | # mkdir -p $out/eostre | ||
| 367 | # install -m 0444 -t $out/eostre \ | ||
| 368 | # ${eostreBuild.initialRamdisk}/initrd \ | ||
| 369 | # ${eostreBuild.kernel}/bzImage \ | ||
| 370 | # ${eostreBuild.netbootIpxeScript}/netboot.ipxe \ | ||
| 371 | # ${pkgs.closureInfo { rootPaths = eostreBuild.storeContents; }}/registration | ||
| 372 | # install -m 0444 ${pkgs.writeText "eostre.menu.ipxe" '' | ||
| 373 | # #!ipxe | ||
| 374 | |||
| 375 | # set menu-timeout 5000 | ||
| 376 | |||
| 377 | # :start | ||
| 378 | # menu iPXE boot menu for eostre | ||
| 379 | # item eostre ${with eostreBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} | ||
| 380 | # item memtest memtest86plus | ||
| 381 | # item netboot netboot.xyz | ||
| 382 | # item shell iPXE shell | ||
| 383 | # choose --timeout ''${menu-timeout} --default eostre selected || goto shell | ||
| 384 | # set menu-timeout 0 | ||
| 385 | # goto ''${selected} | ||
| 386 | |||
| 387 | # :shell | ||
| 388 | # set menu-timeout 0 | ||
| 389 | # shell | ||
| 390 | # goto start | ||
| 391 | |||
| 392 | # :eostre | ||
| 393 | # chain eostre/netboot.ipxe | ||
| 394 | # goto start | ||
| 395 | |||
| 396 | # :netboot | ||
| 397 | # iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn | ||
| 398 | # goto start | ||
| 399 | |||
| 400 | # :memtest | ||
| 401 | # chain --autofree mt86plus.efi | ||
| 402 | # goto start | ||
| 403 | # ''} $out/eostre.menu.ipxe | ||
| 404 | # ''))) | ||
| 405 | ]; | 351 | ]; |
| 406 | }; | 352 | }; |
| 407 | }; | 353 | }; |
