Koch: my flaky NixOS config
Put a bootable NixOS iso image on a USB flash drive, and boot from it
Prime the box
sudo nix --experimental-features ' nix-command flakes' run github:panchoh/Koch#silicon
Set a password for the ‘nixos’ user
passwd # set it to ‘nixos’
From a NixOS host
nixos-anywhere --flake github:panchoh/Koch#silicon nixos@silicon # set PIN to ‘nixos’
Dispose of the ephemeral NixOS Anywhere ssh key
gpg-connect-agent ' keyinfo --list' /bye # get the keygrip of the offending one
gpg-connect-agent ' DELETE_KEY <KEYGRIP>' /bye # さようなら
Manage your SSH key and then let Home Manager finish the setup
run0 systemctl restart home-manager-pancho.service
Optimise the storage just this once
nix store optimise --verbose
You are all set. Happy hacking!
nh os switch --verbose --print-build-logs # or -vL
nixos-rebuild switch --elevate=run0 --diff --verbose --print-build-logs # or --diff -vL
nh os switch --target-host silicon --verbose --print-build-logs # or -vL
nixos-rebuild switch --elevate=run0 --no-reexec --target-host phosphorus --diff --verbose --print-build-logs # or --diff -vL
nh clean all --keep-one --optimise