flake.nix: document the image building/flashing process

i wish i could fixup the perms automatically,
but `chown root:root` during the image building doesn't seem to work
reliably. hmm.
This commit is contained in:
2022-06-24 16:04:25 -07:00
parent 3ecdcdfaaf
commit 2e8eaab536

View File

@@ -56,8 +56,15 @@
nixosConfiguration = decl-machine { inherit name system; };
# this produces a EFI-bootable .img file (GPT with a /boot partition and a system (/ or /nix) partition).
# after building this:
# - flash it to a bootable medium (SD card, flash drive)
# - flash it to a bootable medium (SD card, flash drive, HDD)
# - resize the root partition (use cfdisk)
# - mount the part
# chown root:nixblkd <part>/nix/store
# chmod 775 <part>/nix/store
# chown root:root -R <part>/nix/store/*
# populate any important things (persist/, home/colin/.ssh, etc)
# - boot
# - if fs wasn't resized automatically, then `sudo btrfs filesystem resize max /`
# - checkout this flake into /etc/nixos AND UPDATE THE FS UUIDS.
# - `nixos-rebuild --flake './#<machine>' switch`
img = nixosConfiguration.config.system.build.img;