Open gianarb opened 1 year ago
I know this question is ancient, but for anyone wondering, this is what worked for me, taken from https://carjorvaz.com/posts/ipxe-booting-with-nixos
{inputs, ...}: let
sys = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({
config,
pkgs,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/netboot/netboot-minimal.nix")
];
config = {
# custom installer configuration, most stuff is already configured by the imported module (it includes installation-device profile)
users.users.root.initialPassword = lib.mkForce "pass123";
users.users.nixos.initialPassword = lib.mkForce "pass123";
};
})
];
};
build = sys.config.system.build;
in {
services.pixiecore = {
enable = true;
openFirewall = true;
dhcpNoBind = true; # use existing DHCP server
port = 64172;
statusPort = 64172;
mode = "boot";
kernel = "${build.kernel}/bzImage";
initrd = "${build.netbootRamdisk}/initrd";
cmdLine = "init=${build.toplevel}/init loglevel=4";
debug = true;
};
}
Hello! Awesome project. Simple and it does what it should I love it!
TLDR: I am not sure about how to glue all of this together in a good way
I am writing this question because I think you are faimiliar with NixOS. I am following this guide to netboot a NixOS based operating system
https://nixos.wiki/wiki/Netboot
It generates a ipxe script file that contains the init cmdline
I am trying to figure out a way to teach pixiecore about this file or at least about the init location, ideally via services.pixiecore.cmdLine