This commit is contained in:
Richard Mauer 2024-12-25 22:40:08 -05:00
parent 652bc37caa
commit f339d1a67a
4 changed files with 52 additions and 8 deletions

View File

@ -5,13 +5,13 @@
# but faster for iterating. # but faster for iterating.
makeCpioRecursive = callPackage ./cpio-recursive { makeCpioRecursive = callPackage ./cpio-recursive {
# nixUnstable may not be required. Todo: revisit (2020-05-25) # nixUnstable may not be required. Todo: revisit (2020-05-25)
nix = nixVersions.latest; nix = nixVersions.24.11;
}; };
makePxeScript = callPackage ./pxescript {}; makePxeScript = callPackage ./pxescript {};
makeSquashfsManifest = callPackage ./squashfs-recursive { makeSquashfsManifest = callPackage ./squashfs-recursive {
# nixUnstable may not be required. Todo: revisit (2020-05-25) # nixUnstable may not be required. Todo: revisit (2020-05-25)
nix = nixVersions.latest; nix = nixVersions.24.11;
}; };
} }

View File

@ -10,10 +10,40 @@ in
runCommand "netboot" { runCommand "netboot" {
pxe = '' pxe = ''
#!ipxe #!ipxe
kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init ${cmdlineinitrds} ${toString config.boot.kernelParams} :custom
${builtins.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (name: path: "initrd ${name}") initrds))} clear custom_choice
initrd initrd menu NixOS netboot installer
boot 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; preferLocalBuild = true;
} '' } ''

View File

@ -130,4 +130,4 @@ in
}; };
} }

View File

@ -1,3 +1,17 @@
{ config, pkgs, lib, ... }:
{ {
imports = [ ../quickly.nix ]; imports = [ ../quickly.nix ];
} config = {
users.users.nixos = {
isNormalUser = true;
password = "password123";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
tmux
htop
tree
];
};
};
}