NixOS has enjoyed popularity among ZFS users thanks to
its declarative configuration and native ZFS support.
However, the installation guide used hardcoded disk
names in configuration files, which is unnecessary and
is the source of difficulties in multidisk setups.
The guide is now rewritten to leverage expressions in
the Nix language to manage multidisk setups.
Also adds instruction on replacing failed disk.
Closes#385.
Signed-off-by: Maurice Zhou <ja@apvc.uk>
Previously we used a bind mount from /boot/efis/*-part1
to /boot/efi to facilitate bootloader configuration.
Recent reports indicate that this bind mount prevents
the system from booting. This pull request removes the
bind mount.
Closes#383.
Signed-off-by: Maurice Zhou <ja@apvc.uk>
By my understanding, unnecessary due to unmounting at the end of the instruction. Has lead to unstable and error-spewing ZFS setups, as discussed in this issue: https://github.com/NixOS/nixpkgs/issues/214871
Credit: @mdiepart from #282Closes#282#262
Fix variable export before chroot
Credit: @mdiepart from #282
remind user to enable multi-disk support
NixOS: handle installation failure wrt encrypted boot pool
Closes#279
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
/boot/efi is used exclusively to mirror EFI contents to
other disks, as in `cp /boot/efi/EFI /boot/efis/disk{0,1,2}`
As shown in issue #256, this approach causes trouble with
`nixos-generate-config`, which fills filesystem type as 'none'.
This commit fixes this issue by removing /boot/efi mountpoint and
directly copy from '/boot/efis/primary-disk/EFI/'.
Closes#256
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* Add support for NixOS
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* updated files for immutable root fs
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* update ssh key location
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* change initrd host key name
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* add missing -p switch
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* comments about SSH and encrypted bpool
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* backup hardware-configuration.nix file
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* clearer wording for backup
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* global useDHCP flag is deprecated
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* point user to configuration.nix
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* fixes for systemd-autofs; network; typo
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* force command to return 0
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* fix command to postMount
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* fix mount command
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* escape $i
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* create mountpoints before booting
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* replace postDevice,preMount command
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* disable zfs-mount
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
* generate machine-id
Signed-off-by: Maurice Zhou <jasper@apvc.uk>