From f339d1a67abad9e967999b3421f8cb3e819d077c Mon Sep 17 00:00:00 2001 From: Richard Mauer Date: Wed, 25 Dec 2024 22:40:08 -0500 Subject: [PATCH] Updates --- pkgs/default.nix | 4 ++-- pkgs/pxescript/default.nix | 38 ++++++++++++++++++++++++++++++++++---- quickly.nix | 2 +- size-test/base.nix | 16 +++++++++++++++- 4 files changed, 52 insertions(+), 8 deletions(-) diff --git a/pkgs/default.nix b/pkgs/default.nix index eb074fc..bbb9558 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -5,13 +5,13 @@ # but faster for iterating. makeCpioRecursive = callPackage ./cpio-recursive { # nixUnstable may not be required. Todo: revisit (2020-05-25) - nix = nixVersions.latest; + nix = nixVersions.24.11; }; makePxeScript = callPackage ./pxescript {}; makeSquashfsManifest = callPackage ./squashfs-recursive { # nixUnstable may not be required. Todo: revisit (2020-05-25) - nix = nixVersions.latest; + nix = nixVersions.24.11; }; } diff --git a/pkgs/pxescript/default.nix b/pkgs/pxescript/default.nix index e3bfbbc..a75afdb 100644 --- a/pkgs/pxescript/default.nix +++ b/pkgs/pxescript/default.nix @@ -10,10 +10,40 @@ in runCommand "netboot" { pxe = '' #!ipxe - kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init ${cmdlineinitrds} ${toString config.boot.kernelParams} - ${builtins.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: path: "initrd ${name}") initrds))} - initrd initrd - boot + :custom + clear custom_choice + menu NixOS netboot installer + item --gap Role Installers + item option_one ''${space} Boot NixOS + item option_two ''${space} Loading an ISO + item --gap Testing Tools (incomplete) + item option_three ''${space} Loads another custom sub menu + item option_four ''${space} This is option 4 + choose custom_choice || goto custom_exit + echo ''${cls} + goto ''${custom_choice} + goto custom_exit + + :option_one + kernel http://172.16.1.6/netboot/${pkgs.stdenv.hostPlatform.linux-kernel.target} + ${builtins.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: path: "initrd http://172.16.1.6/${name}") initrds))} + #initrd http://172.16.1.6/netboot/initrd + #initrd http://172.16.1.6/netboot/manifest + #initrd http://172.16.1.6/netboot/nix-store + imgargs ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init ${cmdlineinitrds} ${toString config.boot.kernelParams} + boot || goto custom_exit + + :option_two + kernel {{ memdisk_location }} raw iso + initrd http://path.to/iso + boot || goto custom_exit + + :option_three + echo Chains into another menu... + chain custom1.ipxe || goto custom + + :custom_exit + exit ''; preferLocalBuild = true; } '' diff --git a/quickly.nix b/quickly.nix index 6d484ca..7c61f3a 100644 --- a/quickly.nix +++ b/quickly.nix @@ -130,4 +130,4 @@ in }; -} +} \ No newline at end of file diff --git a/size-test/base.nix b/size-test/base.nix index f626af7..975742a 100644 --- a/size-test/base.nix +++ b/size-test/base.nix @@ -1,3 +1,17 @@ +{ config, pkgs, lib, ... }: + { imports = [ ../quickly.nix ]; -} + config = { + users.users.nixos = { + isNormalUser = true; + password = "password123"; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + tmux + htop + tree + ]; + }; + }; +} \ No newline at end of file