Repository containing my custom nixos installation. I have one particular setup that I enjoy and want to run on all
possible computers. To do this, I factor common functionality in the common directory. This effectively is a library
that is then used by hosts to implement specific hosts. My switch.sh script then installs a given host
given a configuration.
- I have the foundations of an ISO build there, but I am not quite happy with how it ends up working. What I really
want is the following:
- Install ISO, should install a "basic" setup. I want my
hostrepository contained within, preferably up to date. I suppose I could use a github action to create the ISO with the latest. The "basic" setup should preferably have my whole setup (describing thecommonconfiguration). - Given my partitioning of
commonandhosts, on install I want to have a script ONLY in the ISO that basically- pulls the latest update of the repo, I should clone with https so that SSH setup is not required
- generates a new
hostwith a given hostname. - instructs the user to make changes to said
hostuntil they are happy. - when the user is ready,
./switch.sh --installsomething or other should install the repository- do all the partitioning
- move the repository to
$HOME/repositories/personal/hostwhich is my prefered place for it - change the repository to ssh from https somehow
- perhaps run
./switch.shafter everything is in place in case it matters - suggest the user to push their changes upstream
- Currently, I don't think its like this. It should be a goal on my next reinstall to do this!
- Install ISO, should install a "basic" setup. I want my
- I want to understand my setup more. I semi-vibed it meaning there are holes in my understanding.
Build and burn the ISO:
./build-iso.sh
./burn-iso.sh /dev/sdXBoot the USB. You'll auto-login as root and see a prompt. Then:
nmcli host wifi rescan
nmcli host wifi connect "SSID" --ask
install-nixosAfter it finishes:
# set your password
nixos-enter --root /mnt -c "passwd niels"
# reboot
reboot- Create
hosts/<name>/withconfiguration.nix,home-manager.nix, anddisko.nix disko.nixcan just beimport ../../common/disko/standard-nvme.nixor a custom layoutconfiguration.niximports../../common/configuration.nix+ any hardware moduleshome-manager.niximports../../common/home-manager.nix+ any extra packages- Add the host to
flake.nix - Build ISO, boot, run
install-nixos
# rebuild current host
./switch.sh
# format all nix files
./format.sh
# build installer ISO
./build-iso.sh
# burn ISO to USB
./burn-iso.sh /dev/sdX