What is the easiest way to automate a NixOS install on bare metal? I had this question coming from someone, and I didn't quite know how to answer it.
Make a custom boot image I guess?
Partition disks with disko I guess?
But after that, is there a straightforward way to set up the boot image in such a way to pull in a (private) github nixosConfiguration from a flake to do all this stuff on first boot automatically?
I would say this: https://nixos.asia/en/nixos-install-oneclick, once the tutorial is complete.
ah awesome @Shivaraj B H I will check it out.
But I do not want to enter any commands on the machine I am installing NixOS on.
Then it would be nixos-anywhere. Assuming you have wired ethernet and ssh access, it should work.
yeah so the idea is then this?
1) Make a custom boot iso for NixOS with ssh access and ssh keys and stuff
2) Boot machine from that ISO
3) Use nixos-anywhere remotely to do disk configuration and proper installation
You wouldn’t need NixOS in Step 1, it could be any Linux distro
Yeah okay, technically that is true, but assuming I don't wanna mess with that and have a fundamentalist-purist approach :smile:
Also we are talking bare-metal install here, so I have physical access to the machine, I can put a USB drive in with whatever I have.
The important point is also: I don't want to install any other Linux distro first. I just want to boot a live ISO.
Can I use nixos-anywhere with, let's say, an Arch Linux Live USB boot?
Yes
Can I use nixos-anywhere with, let's say, an Arch Linux Live USB boot?
Yes
The important point is also: I don't want to install any other Linux distro first. I just want to boot a live ISO.
In this case, I would still say https://nixos.asia/en/nixos-install-oneclick is most reliable approach
Last updated: Nov 15 2024 at 12:33 UTC